StudyVisuallyStart studying
Part 05 · Embeddings + RAG · Card 11 of 14

Metadata

Store the source file, section and date with each chunk.

Last updated

Analogy

Foreign keys for your chunks, so you can filter them and link back to where they came from.

In an agent

Metadata lets the agent filter by source and cite where an answer came from.

Questions people ask

What metadata should I store with each RAG chunk?

At least the source document, the section heading and a date. With these you can filter searches, for example only the current policy or one product's docs, and the agent can cite where its answer came from so users can check it. Store the metadata in normal columns next to the vector.

How does metadata help an agent cite sources?

Each retrieved chunk carries its file name and section, so the model can name them in the answer and your UI can link back to the original page. Users can then verify the answer, and when something is wrong you can see at once which document caused it.