A knowledge base gives an application access to information an LLM does not already know. For a small collection, the application can attach everything to each prompt; for larger collections, it can search a document repository and attach only relevant passages. section 1.4
A reusable knowledge base commonly follows these stages:
- Upload documents, split them into chunks, and save the resulting dataset. section 4.2
- Convert chunks into numerical embeddings and store them in a local vector store. section 4.2
- Inspect or search stored chunks, then retrieve relevant entries for a flow that supplies context to the LLM. section 4.2
Answering an office-hours question
A prompt can include an office address, phone number, and opening hours. When asked when the office opens, the LLM uses the relevant hours while ignoring the unnecessary address and phone number. section 1.4
Figure 4.8 The document ingestion subflow of our RAG system
Trace document ingestion from source files through extracted text, chunks, and storage in the knowledge base. section 4.2









