SemanticSimilarityExampleSelector
AI overview
Sign in and the AI will write an overview from our coverage.
Headlines · 1
- LangChain Tutorial Uses Semantic Retrieval for Few-Shot Prompts
A tutorial demonstrates how to build a dynamic few-shot prompting pipeline with LangChain. It loads a local bge-large-zh-v1.5 embedding model, uses Chroma and SemanticSimilarityExampleSelector to retrieve the three examples most semantically similar to each input, and combines them with the current review through FewShotPromptTemplate. The example constructs a sentiment-classification prompt but does not directly call a large language model.
掘金 · 人工智能 · 🔥 0
Experience and discussion from the community
Share my SemanticSimilarityExampleSelector experienceAsk about SemanticSimilarityExampleSelector
Nobody has shared their experience with SemanticSimilarityExampleSelector yet.