This feature is in open beta. It is only available to paid team plans. Please reach out to support@langchain.dev if you have questions about enablement.
Pre-conditions
- Your dataset must use the KV store data type (we do not currently support chat model or LLM type datasets)
- You must have an input schema defined for your dataset. See our docs on setting up schema validation in our UI for details.
- You must be on a paid team plan (e.g. Plus plan)
- You must be on LangSmith cloud
Index your dataset for few shot search
Navigate to the datasets UI, and click the newFew-Shot search
tab. Hit the Start sync
button, which will create a new index on your dataset to make it searchable.

Few-shot index
on the lefthand side of the screen in the next section.
Test search quality in the few shot playground
Now that you have turned on indexing for your dataset, you will see the new few shot playground.

Search uses a BM25-like algorithm for keyword based similarity scores. The actual score is subject to change as we improve the search algorithm, so we recommend not relying on the scores themselves, as their meaning may evolve over time. They are simply used for convenience in vibe-testing outputs in the playground.
Adding few shot search to your application
Click theGet Code Snippet
button in the previous diagram, you’ll be taken to a screen that has code snippets from our LangSmith SDK in different languages.

Code snippets
Please ensure you are using the python SDK with version >= 1.101 or the typescript SDK with version >= 1.43