liveBook · Manning

Knowledge base

As explained in Grokking AI Applications

An organized collection of information that can be searched or supplied to an application.

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

How Grokking AI Applications covers it

How deep it goes
Explains prompt attachment, document search, chunking, embeddings, and vector storage, while deferring consistent retrieval to RAG.
Examples
Uses office information and Langflow document chunks as examples of retrieved knowledge supplied to an LLM.
What you can do after
Operate/configure a Langflow Knowledge Base by uploading documents, previewing chunks, saving them, and retrieving them in a flow.
How it connects
Connects LLMs with document repositories, embeddings, vector stores, and Retrieval-Augmented Generation.

Also explained in

Compare how 10 books explain knowledge base →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Applications. The section links point to the parts of the book it draws on.