Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Stećak Oracle: Exploring Medieval Stone Monuments with Sanity and Gemini

Description and use

Stećak Oracle combines Sanity, Next.js, and Google Gemini to provide evidence‑based answers about medieval tombstones, ensuring the AI distinguishes documented facts from interpretations.

Problem

Provide accurate, evidence‑based answers about medieval tombstone monuments (stećci) without relying solely on AI hallucinations.

Outcome

The app delivers concise, evidence‑based answers about stećci, clearly marking interpretations and citing sources, while keeping the data layer separate from the AI layer.

Workflow

  • Define content types in Sanity (Stećak, Motif, Source) with relationships.
  • Populate Sanity with records, motifs, and sources (e.g., UNESCO data).
  • Build Next.js frontend with pages for home, stećak details, motifs, sources, and an Oracle UI.
  • Create a Next.js API route that receives user questions.
  • In the API route, fetch the full knowledge base from Sanity (steći, motifs, sources).
  • Serialize the data and embed it in a Gemini prompt with explicit instructions to avoid hallucinations and distinguish facts from interpretations.
  • Send the prompt to Gemini via @google/genai using a server‑side API key.
  • Return Gemini’s answer to the frontend for display.
  • Iterate: add more records or refine prompts as needed.

Evidence

Store structured historical information in Sanity, then let an AI model answer questions using that information as its knowledge base.

Source

The application uses an environment variable for the API key: GEMINI_API_KEY=...

Source

I also explicitly tell the model: - Do not invent historical facts. - Distinguish documented facts from interpretation.

Source

  • Record date: 2026-09-22T01:30:16.656Z