liveBook · Manning

Knowledge base

As explained in AI Agents and Applications

An internal knowledge base is information encoded in a language model's learned parameters and available without consulting external data sources.

For an LLM application, a knowledge base is a collection of trusted documents that can supply relevant context to answer questions. In a retrieval-augmented generation (RAG) workflow, documents are split into chunks, converted into embeddings, and stored—often in a vector database—so relevant content can be retrieved and added to a prompt. section 1.4.2 section 6.1.2

A typical RAG knowledge-base workflow:

  • Load documents from sources such as PDFs, web pages, or databases. section 1.7
  • Split large documents into smaller text chunks. section 1.4.2
  • Embed the chunks and store the text alongside its vectors in a vector store for similarity-based retrieval. section 1.4.2 section 1.7

Enterprise question answering

A chatbot can retrieve focused passages from company documents or an intranet to answer a question. Supplying only relevant content avoids overloading the prompt with entire large documents and can improve speed, cost-efficiency, and accuracy. section 6.1.2

Figure 1.9 A collection of documents is split into text chunks and transformed into vector-based embeddings. Both text chunks and related embeddings are then stored in a vector store.
figure

Shows documents split into text chunks, transformed into embeddings, and stored together in a vector store. section 1.4.2

How AI Agents and Applications covers it

How deep it goes
Describes document ingestion, chunking, embedding, and vector storage, but does not provide implementation code here.
Examples
Uses local documents and enterprise intranet content to illustrate retrieval for question answering.
What you can do after
Build it from scratch by loading documents, splitting text, embedding chunks, and storing them for retrieval with LangChain components.
How it connects
Connects knowledge bases to RAG, embeddings, vector databases, document loaders, text splitters, and retrievers.

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 AI Agents and Applications. The section links point to the parts of the book it draws on.