Live Demo
An AI-powered access layer for migrant narratives
Problem
A person may need one idea, one quote, or one moment,
but inside long videos with weak captions,
finding it by hand is slow
Solution
The goal is to make migrant knowledge searchable, reusable, and easy to connect with
Results
| Metric | Score | Meaning |
|---|---|---|
| Faithfulness | 0.96 | Claims backed by context |
| Answer relevancy | 0.78 | Answers the question |
| Context precision | 0.90 | Retrieved context is relevant |
| Context recall | 0.73 | Ground truth is covered |
Architecture
Data foundation
This is the decision that made the Spanish agent reliable
Agent architecture
Agent structure
def create_agent(): llm = ChatGoogleGenerativeAI( model="gemini-2.5-flash", temperature=0.2, tool_config={"function_calling_config": {"mode": "ANY"}}, ) store = Chroma( collection_name="migrant_archive", embedding_function=GoogleGenerativeAIEmbeddings( model="gemini-embedding-2" ), persist_directory="data/chroma", ) tools = [ list_videos, get_video_info, search_transcripts, ] prompt = system_prompt + chat_history + user_input + agent_scratchpad agent = create_tool_calling_agent(llm, tools, prompt) executor = AgentExecutor( agent=agent, tools=tools, max_iterations=10, return_intermediate_steps=True, ) return RunnableWithMessageHistory( executor, get_session_history, history_messages_key="chat_history", )
Tool registry
@tool def list_videos(year=None, speaker=None, channel=None): """ Browse the indexed video catalog. Returns titles, years, channels, speakers, chunk counts, video IDs, and YouTube URLs. """ @tool def get_video_info(video_id): """ Inspect one specific video. Returns title, year, channel, duration, speakers, chunk count, description, transcript preview, and URL. """ @tool def search_transcripts(query, video_id=None, year=None, channel=None): """ Search what was said inside the videos. Uses ChromaDB similarity search and optional filters to retrieve the most relevant transcript chunks. """
Product
The browser never runs the AI, it calls the API, and the backend runs the agent, keeping keys off the client
Migrant Archive
Where we'd take this next
Appendix · Data foundation
The rest of the system does not care how a transcript was produced
{ "video_id": "…", "title": "…", "description": "…", "transcript_segments": [ { "text": "…", "start": 0.0, "duration": 0.0, "speaker": "…" } ], "full_text": "…", "metadata": { "channel", "duration", "views" } }
Appendix · Validation scripts
Verify top-k3 retrieval, similarity, and distance
Appendix · Observability
LangSmith hooks into LangChain's callbacks when tracing is enabled, with no changes to the agent code
Appendix · Implementation