Retrieve the dataset examples whose inputs best match the current inputs.
Must have few-shot indexing enabled for the dataset. See client.index_dataset().
similar_examples(
self,
inputs: dict,
,
*,
limit: int,
dataset_id: ID_TYPE,
filter: Optional[str] = None,
**kwargs: Any = {}
) -> list[ls_schemas.ExampleSearch]| Name | Type | Description |
|---|---|---|
inputs* | dict | The inputs to use as a search query. Must match the dataset input schema. Must be JSON serializable. |
limit* | int | The maximum number of examples to return. |
dataset_id* | Union[UUID, str] | The ID of the dataset to search over. |
filter | Optional[str] | Default: NoneA filter string to apply to the search results. Uses
the same syntax as the For example, you can use |
**kwargs | Any | Default: {}Additional keyword arguments to pass as part of request body. |