Knowledge base
A knowledge base is an organized body or representation of information that people or computational systems can consult to support retrieval, reference, reasoning, or tasks.
Build Python Web Apps with Streamlit
A knowledge base is an organized collection of information that a system can consult to answer questions about a defined subject.
- How it is used
- Supplies company-specific information to a customer support chatbot answering product and business questions.
- How deep it goes
- Explains retrieval-augmented generation and implements article loading, chunking, vector search, and prompt augmentation.
- Examples
- Uses product-description and fountain-pen maintenance articles as a customer support knowledge base.
- What you can do after
- Apply it via Pinecone and LangChain to retrieve support article excerpts for a chatbot.
Read how Build Python Web Apps with Streamlit explains knowledge base →
Natural Language Processing in Action, Second Edition
A knowledge base is an organized collection of facts, entities, and relationships representing information about a domain or the world.
- How it is used
- Supports NLP interpretation, chatbot business logic, question answering, retrieval, and decisions with organized domain knowledge.
- How deep it goes
- Descends from organizational purpose to graph inference and executable SPARQL queries, while deferring broader commonsense compilation challenges.
- Examples
- Uses Wikidata identifiers, SPARQL queries, scholarly authorship, and a military-rank inference graph.
- What you can do after
- Apply it via SPARQL to retrieve linked entities and answer questions requiring multiple relational hops.
Read how Natural Language Processing in Action, Second Edition explains knowledge base →
Grokking AI Applications
An organized collection of information that can be searched or supplied to an application.
- How it is used
- Supplies application-specific information to language models so responses can use facts beyond their pretraining.
- How deep it goes
- Defines prompt attachment and repository search, while deferring consistent retrieval details to RAG.
- Examples
- Uses office hours and contact details as prompt context, and reusable document chunks in Langflow.
- What you can do after
- Operate/configure Langflow Knowledge Bases to upload documents, inspect chunks, search them, and retrieve them in a flow.
Domain-Specific Small Language Models
Retrieved outside information supplied to a model at inference time to ground its output.
- How it is used
- Supplies retrieved outside information as context for answers to user queries.
- How deep it goes
- Traces document preparation, embedding, retrieval, and generation through a single-PDF implementation.
- Examples
- Uses a PDF corpus and a “blocked KV-cache” query to demonstrate chunk retrieval and answer prompting.
- What you can do after
- Build it from scratch with task-specific Python packages for PDF extraction, embedding, retrieval, and generation.
Read how Domain-Specific Small Language Models explains knowledge base →
Retrieval Augmented Generation, The Foundational Ideas
The internal knowledge base is the case study's repository of Mastercard support information supplied to the assistant.
- How it is used
- Supplies retrievable evidence for grounded answers when model training data may be outdated or lack internal documents.
- How deep it goes
- Explains offline document processing and online retrieval, ranking, and generation, but does not specify a database schema.
- Examples
- Uses ambiguous fintech acronyms and a baseline evaluated on 85 question-answer pairs to show retrieval difficulty.
- What you can do after
- Evaluate/understand knowledge-base retrieval through Hit Rate @5, latency, and errors caused by ambiguous or fragmented documentation.
Read how Retrieval Augmented Generation, The Foundational Ideas explains knowledge base →
Build AI-Enhanced Web Apps
A knowledge base is an organized collection of information representing questions, answers, facts, or other domain knowledge.
- How it is used
- Deploys organized domain content as searchable context for support tools, corporate assistants, interview feedback, and conversational AI.
- How deep it goes
- Explains document workflows and embedding-based retrieval, including query encoding and cosine similarity, while deferring deeper vector-store implementation.
- Examples
- Uses IT support questions, interview best practices, PDF and DOCX uploads, multi-tenant collections, and conversational corporate knowledge bases.
- What you can do after
- Build it from scratch as a JavaScript retrieval workflow or operate it as a secure multi-knowledge-base chat application.
Read how Build AI-Enhanced Web Apps explains knowledge base →
Build an Advanced RAG Application (From Scratch)
A knowledge base is an organized repository of facts, documents, or other information intended to support retrieval and reasoning.
- How it is used
- Uses organized external information to ground RAG responses in relevant, domain-specific, or changing knowledge.
- How deep it goes
- Explains the RAG role and demonstrates embedding, normalization, indexing, retrieval, and prompting, without detailing storage maintenance.
- Examples
- Demonstrates a Paris hotel-review index queried for Eiffel Tower views and used to generate a cited recommendation.
- What you can do after
- Build a small semantic search knowledge base with SentenceTransformer embeddings, FAISS retrieval, and generated answers.
Read how Build an Advanced RAG Application (From Scratch) explains knowledge base →
AI Agents in Action
A knowledge base is an organized collection of information that a system can retrieve or use when answering questions and performing tasks.
- How it is used
- Supplies assistants and agents with document-based information for answering questions through file uploads or retrieval.
- How deep it goes
- Walks through document loading, chunking, embedding, querying, and agent connection; limits configuration to basic splitting and chunking options.
- Examples
- Uses uploaded books, the Back to the Future script, semantic-search exercises, and experiments with document splitting and compression.
- What you can do after
- Operate/configure a Nexus knowledge store, index documents, connect it to a supported agent, and compare retrieval across splitting and compression choices.
Effective Conversational AI
A knowledge base is an organized collection of information that can be searched to support answering questions.
- How it is used
- Supports conversational search by supplying data that a large language model searches before generating an answer.
- How deep it goes
- Descends to source documents, URLs, enrichments, and ingestion schedules, but stops short of specifying storage or retrieval implementation.
- Examples
- Uses source documents, URLs, enrichments, ingestion schedules, and hybrid intent-to-search routing as concrete artifacts and patterns.
- What you can do after
- Diagnose weak understanding by auditing knowledge-base sources, enrichments, and ingestion schedules for relevance and freshness.
Read how Effective Conversational AI explains knowledge base →
Architecting for Autonomy
A governed collection of information made available as contextual knowledge for an agent or other information system.
- How it is used
- Acts as governed context for agent retrieval, interpretation, memory, and action within enterprise information architecture.
- How deep it goes
- Defines operational dependencies and governance controls, but stops short of implementation detail for storage or retrieval systems.
- Examples
- Uses a supplier-obligation amendment to demonstrate synchronized indexing, relationships, supersession, retrieval priority, and memory updates.
- What you can do after
- Operate/configure governed context by controlling versions, access, lineage, reuse boundaries, isolation, and retrieval-relevant metadata.
Read how Architecting for Autonomy explains knowledge base →
Knowledge Graphs and LLMs in Action
A knowledge base is a repository that stores structured representations of facts, entities, relationships, and rules for computational use.
- How it is used
- Supports domain-specific autonomous advisors by supplying established knowledge for reasoning and feedback-driven updates.
- How deep it goes
- Explains acquisition, graph representation, reasoning use, and completeness limitations, but stops short of implementation syntax or storage technology.
- Examples
- Uses medical diagnosis, disease–symptom probabilities, patient preferences, action costs, treatment outcomes, and logical decision statements.
- What you can do after
- Evaluate how deductive reasoning uses structured domain knowledge to propose actions, while recognizing completeness and accuracy requirements.
Read how Knowledge Graphs and LLMs in Action explains knowledge base →
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.
- How it is used
- Grounds LLM answers in trusted local or company data by retrieving relevant context before generation.
- How deep it goes
- Describes ingestion, chunking, embedding, storage, and retrieval, while leaving detailed reliability techniques for later.
- Examples
- Uses company intranets and documents, including PDF, DOCX, TXT, and PPT files, as sources.
- What you can do after
- Build it from scratch by ingesting documents, creating embeddings, storing them, and retrieving context for prompts.
Read how AI Agents and Applications explains knowledge base →
Inside AI
A knowledge base is a repository of domain-specific facts and rules that represents accumulated expert knowledge for an intelligent system.
- How it is used
- Supports expert systems by storing domain rules separately from the procedures that execute them.
- How deep it goes
- Defines rule storage and component separation, then relates rules to inference and maintenance without detailing implementation.
- Examples
- Uses gardening advice, MYCIN’s infection diagnosis, and industrial emergency-pump rules as concrete applications.
- What you can do after
- Evaluate how expert systems store, update, and apply domain expertise through explicit rules.
Machine Learning System Design
A knowledge base is an organized repository of structured facts, entities, relationships, or domain-specific information.
- How it is used
- Uses organized entity information to correct model inputs promptly when retraining cannot meet the required release timeline.
- How deep it goes
- Explains the pre-inference lookup and hinting workflow, but stops short of specifying repository design or matching algorithms.
- Examples
- Uses missing customer entities and rapid, nontechnical additions as the central operational example.
- What you can do after
- Apply it to augment model inputs and resolve selected recognition failures without retraining.
Read how Machine Learning System Design explains knowledge base →
Designing AI Systems
A knowledge base is an organized repository of domain-specific facts, documents, or policies that can provide authoritative information to an application.
- How it is used
- Grounds application responses in organization-specific products, policies, and documentation through retrieval.
- How deep it goes
- Explains its role in semantic retrieval and response grounding, but stops short of specifying storage schemas, indexing, or implementation code.
- Examples
- Uses electronics-return documents covering return windows, restocking fees, receipts, and original packaging.
- What you can do after
- Apply it via semantic search to ground generated answers in current organizational policies and documentation.
Also covered in
- Data Storytelling with Altair and AI
- Essential GraphRAG
- The Creative Programmer
- Machines that ThinkIn early access (MEAP)
- The Art of AI Product Development
- Build an AI Agent (From Scratch)
- Think Like a CTO
- Writing for Developers: Blogs that get read
- AI Agents in Action, Second Edition
- Graph Algorithms for Data Science
- Building Reliable AI Systems
- AI Agents for Offensive SecurityIn early access (MEAP)
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- similarity searchSimilarity search is a retrieval technique that finds or ranks items by their similarity to a query, often by comparing feature or vector representations under a similarity or distance measure.
- retrieval-augmented generationRetrieval-augmented generation is a technique that retrieves relevant information from external sources and supplies it as context to a generative model when producing an output.
- hallucinationA hallucination is model-generated content that is false, fabricated, or unsupported by relevant evidence but presented as plausible or factual.
Related concepts
- retrieval-augmented generationused by · Retrieval-augmented generation is a technique that retrieves relevant information from external sources and supplies it as context to a generative model when producing an output.
- similarity searchused by · Similarity search is a retrieval technique that finds or ranks items by their similarity to a query, often by comparing feature or vector representations under a similarity or distance measure.
- Retrieverused by · A retriever is a software component that searches or queries an information source and returns items relevant to a query for use by downstream processes.
- entity linkingused by · Entity linking is the task of mapping a textual or database mention to the canonical entity it denotes, often represented by an identifier in a knowledge base.
- information retrievalused by · Information retrieval is the process of finding and selecting information relevant to a query or information need from a collection.
Questions about knowledge base
What is knowledge base?
A knowledge base is an organized body or representation of information that people or computational systems can consult to support retrieval, reference, reasoning, or tasks.
Which Manning books explain knowledge base?
Build Python Web Apps with Streamlit, Natural Language Processing in Action, Second Edition, Grokking AI Applications, Domain-Specific Small Language Models, Retrieval Augmented Generation, The Foundational Ideas, Build AI-Enhanced Web Apps, Build an Advanced RAG Application (From Scratch), AI Agents in Action and 7 more.
What should I know before learning knowledge base?
Manning books that teach knowledge base usually introduce language model, similarity search, retrieval-augmented generation and hallucination first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.














