LangChain’s approach selects the three most similar reviews from an example library for each request, then inserts them into the prompt sent to the large language model. It turns prompts from fixed text into inputs assembled around the task at hand. What matters here is that deploying large language models does not necessarily require model training; retrieval and orchestration are often more practical.

What this is

Few-shot learning gives a model a small number of examples illustrating the desired format and rules so it can imitate them to complete a task, without retraining. Dynamic example selection goes a step further: each time an input arrives, the system determines which examples are most relevant and decides what to include in the prompt.

The implementation described here uses bge-large-zh-v1.5 to convert text into vectors, stores them in a Chroma vector database, and retrieves the three examples with the closest semantic meaning. A vector database can be understood as a system that searches by “meaning” rather than keywords. The large language model ultimately receives the task instructions, three reference examples, and the content to be evaluated—not the full set of original examples.

Industry view

We believe its value starts with engineering: the example library can be expanded continuously without rewriting the prompt, while carrying only relevant content can reduce input length and model-call costs. For tasks with relatively stable rules, such as review classification, customer-support routing, and table extraction, this is generally lighter than training a new model.

That does not mean the model’s capabilities are “automatically filled in.” Selecting the wrong examples, ambiguous labels, or insufficient coverage in the library can distort the prompt. High semantic similarity also does not mean the answers are the same: “the price is too high” and “the delivery is too slow” may both express negative sentiment, but they correspond to different evaluation dimensions. The example’s bge-large-zh-v1.5 model must also run locally on a CPU, and as the example library grows, retrieval latency, storage requirements, and operational overhead all increase. Companies still need to test accuracy with real samples and monitor whether the selected examples are appropriate; retrieving three examples is not the same as getting the model’s answer right.

Impact on regular people

For enterprise IT: Traditional companies can turn internal experience, review standards, and historical cases into model references without first building a training team. However, this approach still requires maintaining an example library, embedding models, and evaluation data.

For individual work: When employees write requirements or customer-support staff classify tickets, they can move from fixed templates to retrieving examples tailored to the specific issue. Prompt writing, review, and result checking may consequently become new job responsibilities.

For the consumer market: More relevant examples may improve the specificity of classification, recommendations, and customer-support replies. However, users will still have little visibility into which internal cases the system relied on, and incorrect judgments will also appear more seamlessly within service interactions.