Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › AI Q&A

Ask the Archive: A Source-Bound Q&A Agent for 150 Stories of Black California History

By Freedom251 Team · · 5 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ask the Archive is a question-and-answer interface built on 150 stories of Black California history. Its defining behavior is restraint: when the archive does not cover a question, the agent is designed to say so and stop, rather than fill the gap from general knowledge. The only detailed account of how it was built is a first-person project report by Nikema, a software engineer who runs California Black Stories, published on DEV Community on September 29, 2026. Everything below about the archive’s size, design and checks comes from that report, and the author’s own description of what was verified is narrower than a full historical audit.

What the archive contains

The author reports 150 story documents, 436 fact-check claims and 45 thematic pillars, and says each claim carries at least one source URL. These are the author’s figures, not counts measured independently. The archive is organized into four kinds of records, which matters because it lets the agent answer questions about people and places from structured entries, not only from story text.

As an Amazon Associate I earn from qualifying purchases.

Record type What it holds, according to the project report
Story The main narrative documents, drawn from the author’s research notes after an ingest parser normalized them
Person Structured entries for individuals who appear across stories
Place Structured entries for locations, such as buildings or neighborhoods named in stories
Source Records for the materials that stories and claims cite

The story documents were imported into a production Sanity dataset. A Sanity Context knowledge base was then built over the story records. The author says it distilled 33 entries from the 150 stories and linked each entry back to the story it came from. The knowledge base, not the full text of every story, is what the answering model sees.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How a question moves through the system

The project is a Next.js chat interface with an /api/ask route. Based on the author’s description, a question is handled in this order:

#1 Best Overall
Sale
100 African Americans Who Shaped American History: Incredible Stories of Black Heroes (Black History Books for Kids)
  • non-fiction african american book set
  • non-fiction black book set
  • non-fiction african american children's book set
  • non-fiction black children's book set
  1. The reader submits a question in the chat interface, which posts it to /api/ask.
  2. The route uses an AI SDK MCP client to query the Sanity Context endpoint for relevant knowledge-base entries.
  3. The model receives those entries as its only context. Its instructions tell it to answer from them and to refuse when they do not cover the question.
  4. The real source URLs for the matching entries are injected from Sanity into the prompt, so the answer can cite them as they are, rather than inventing them.
  5. When sources disagree, the instructions ask the agent to present the accounts side by side and attribute each one.

The practical consequence is that an answer is only as good as retrieval. If the right entry is not retrieved, the agent should refuse, not improvise. The author’s report does not describe the retrieval logic in detail beyond this path.

The scope rule: refusal is the intended behavior

The author’s stated boundary is simple: “No general knowledge, no gap filling.” The intended refusal behavior is put this way: “if the archive does not cover the question, it says so and stops.” In practice, readers should expect two kinds of answers: a cited answer drawn from archive entries, or a refusal.

Kind of question Example named by the author Expected result
Person covered by the archive Biddy Mason Answer drawn from archive entries, with source links
Event covered by the archive The Palace Hotel sit-in Answer drawn from archive entries, with source links
Event outside the archive The Montgomery bus boycott Refusal, because the author says the topic is outside this archive

These examples are the author’s, not a complete list of covered or uncovered topics. A question about a Black Californian who is not in the 150 stories will likely be refused even if the person is historically documented elsewhere, because that is the boundary the design enforces.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Two grounding failures the author reports and fixed

The author describes two failures found during testing. Both are presented as corrected, and the corrections were the author’s own changes. Whether they hold in the live demo today is not something this report can confirm.

Answers continued after a refusal

In some tests, the agent refused an out-of-scope question and then answered it from general knowledge anyway. The author says the system instruction was tightened and the refusal behavior was retested. Readers who see an answer to an uncovered question with no citations should treat it as a failure of the boundary, since a grounded answer should always point to archive entries.

Plausible but false links

The knowledge-base entries originally carried story titles but no source URLs. When asked for sources, the model sometimes generated links that looked correct but were not real. The author says the route was changed to inject the real source URLs from Sanity into the prompt, so the model copies them rather than producing them. That change addresses the cause, but it does not by itself prove that every cited URL points to a working page.

When sources disagree

The author states a principle the agent is meant to follow: when the archive contains conflicting accounts, show them side by side and attribute each one, rather than silently picking a version. This is the right behavior for contested history, but the report does not give a specific example of a disagreement in the archive, so readers should not assume a particular case has been tested. If you find an answer that presents one version as settled when the cited stories differ, check the underlying story entries directly.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the checks show, and what they do not

The author reports several mechanical checks on the knowledge-base output:

  • 479 citation markers resolve to real story titles in the archive.
  • No two stories cover the same person or event, which the author presents as a duplication check.
  • The corpus report states that every claim has at least one source URL.

The author is explicit that these are structural and citation-level checks, not a line-by-line re-fact-check of all 436 claims. The report therefore does not establish the independent accuracy of the historical claims, the current behavior of the live demo, or whether the public source repository still matches the deployment described. Those are questions for the archive’s maintainer or for independent historians who can check the cited sources.

How to get useful answers from it

  • Ask about a named person, place or event, since the design routes questions through person, place and story entries.
  • Open the cited story entries before relying on an answer for quotation or citation in your own work.
  • Treat a refusal as information about coverage, not as a failure to find the answer somewhere else.
  • If an answer seems to reach beyond the cited material, report it, since the author’s own testing found that exact failure mode.

Where Sanity fits

Sanity is the content platform the project relies on: it hosts the imported story dataset and the Sanity Context knowledge base that the chat route queries. For readers interested in the architecture rather than the history, the notable design choice is that structured records and a knowledge-base endpoint sit between the archive and the model, which is what makes source-URL injection possible. The report does not describe any commercial arrangement with Sanity, and none is implied here.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AI Q&ABlack California historydigital archivesNext.jsretrieval-grounded AISanity

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.