Data Library setup versus runtime
Key Takeaway
At setup, a data library builds a search index and a retriever. At runtime, the retriever searches that index and adds the most relevant chunks to the prompt before the LLM answers. Both phases consume Data 360 credits.
An Agentforce Data Library connects agents and prompt templates to your own unstructured or semi-structured content, such as knowledge articles and uploaded files. A data library works in two phases. At setup, saving the library automatically builds a pipeline in Data 360: a data stream, mapped objects, a search index and a retriever. At runtime, each question uses that retriever to pull the most relevant pieces of content into the prompt before the LLM answers.
Four concepts behind a data library
Four concepts explain how a data library turns your content into answers.
- Grounding adds domain-specific or customer information to the prompt.
- Chunking breaks long sources into smaller pieces that still make sense on their own. Smaller pieces make search more efficient and keep the prompt within the LLM's token limit.
- Indexing organizes the chunks into a search index, much like a store catalog organizes products so shoppers can find them.
- A retriever is a pointer between data and AI features that decides which Data 360 datasets the AI tools can reach.