liveBook · Manning

Information retrieval

As explained in Data Storytelling with Altair and AI

Information retrieval is the process of searching for and returning relevant information from a collection or external knowledge source.

Information retrieval searches an external knowledge source, such as a text corpus or structured database, and returns context that can improve generated answers. In retrieval-augmented generation (RAG), retrieval precedes text generation and supplies relevant facts. section 7.4.2

A practical retrieval pipeline moves through these stages:

  • Load a product webpage and split its text into overlapping chunks. section 7.4.2
  • Represent chunks as embeddings and persist them in a Chroma vector database. section 7.4.2
  • Query the store through LangChain, then pass retrieved context to an LLM. section 7.4.2

Product commentary

A RAG application queries a smartphone description stored from an HTML page and generates a concise answer about the New SmartX 2023, returning source documents alongside the result. section 7.4.2

Figure 7.13 A RAG-based system
figure

Use the architecture diagram to trace the flow from external product text through retrieval to generated commentary. section 7.4.2

How Data Storytelling with Altair and AI covers it

How deep it goes
Explains retrieval through loading, chunking, embedding, storage, prompting, querying, and returned sources, without developing retrieval algorithms internally.
Examples
Demonstrates retrieval over an HTML smartphone description using LangChain, Chroma, OpenAI embeddings, and a RetrievalQA chain.
What it assumes
Assumes familiarity with LLM applications and introduces the preparation needed to load, split, vectorize, store, and query text.
What you can do after
Build it from scratch with LangChain and Chroma to answer product questions using retrieved webpage context.
How it connects
Connects information retrieval with retrieval-augmented generation, embeddings, vector databases, prompt templates, and large language models.

Also explained in

Compare how 11 books explain information retrieval →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Storytelling with Altair and AI. The section links point to the parts of the book it draws on.