Few-shot Learning

Few-shot learning helps AI LLMs pick up and apply knowledge from just a handful of examples. It involves using multiple sets of prompts between the user and the AI assistant that we internally send to LLM with every API request.

Pipe enables developers to define multiple user and AI assistant prompts and completion pairs that can be used to few-shot train any LLM.


Following is a quick guide on how to do few-shot learning inside a Pipe.


Step #1

Navigate to any of your Pipes on Langbase. Click once on User and then on AI Assistant besides Add Message By. It will create two text areas, one for the user prompt and the other for the AI assistant prompt.


Step #2

Add completions for both user and AI assistant prompts.

These completions will be used by LLM to learn and generate responses based on the incoming user prompts.