Space-Talks: Apollo Query System
π 288.6k MiniLM vectors β’ semantic + keyword search β’ Gemini answers
π Command-Line Query Guide
π§ Basic Syntax
.venv312/bin/python scripts/04_query.py "your query" [options]Query the Space Race corpus with semantic search + LLM answering. Use the .venv312 interpreter β semantic search needs the local MiniLM model (torch is unavailable on Python 3.14/Intel Mac). Keyword mode works in any venv.
π― Keyword Mode (exact match, no API)
--keyword, -k β exact substring search over the corpus. Fast, deterministic, needs no embeddings.
python scripts/04_query.py "had a problem" --keyword --mission as13 --mode dialogue--context, -c β turns of context before/after each match (default 3)
python scripts/04_query.py "The Eagle has landed" --keyword --context 5 --mode dialogueπ Simple Examples
python scripts/04_query.py "What happened during Apollo 13?"python scripts/04_query.py "Armstrong moon landing" --verbosepython scripts/04_query.py "oxygen tank" --top-k 10π― Filtering Options
--mission, -m β Filter by mission (e.g., as11, as13, as8)
python scripts/04_query.py "moon walk" --mission as11--speaker, -s β Filter by speaker (e.g., cdm, cc, lmp)
python scripts/04_query.py "houston" --speaker ccπ Output Modes
--mode, -M β Output format: 'answer' or 'dialogue' (default: answer)
python scripts/04_query.py "abort" --mode answerpython scripts/04_query.py "navigation" --mode dialogueπ§ Advanced Options
--top-k β Number of turns to retrieve (default: 5)
python scripts/04_query.py "guidance" --top-k 15--verbose, -v β Show similarity scores and reasoning
python scripts/04_query.py "launch" --verbose--debug β Show full system + user prompts
python scripts/04_query.py "recovery" --debug--log-level β Logging: DEBUG, INFO, WARNING (default: INFO)
python scripts/04_query.py "transcend" --log-level DEBUGπ Complete Example
python scripts/04_query.py "oxygen tank malfunction" \
--mission as13 \
--mode answer \
--top-k 8 \
--verbose \
--log-level DEBUGβ Features
β Semantic search β local MiniLM embeddings (all-MiniLM-L6-v2, 384-dim), no API needed
β Keyword exact-match search over the full corpus
β LLM answer generation β Gemini (gemini-flash-latest)
β Context assembly (turns before/after for continuity)
β Similarity scoring (cosine, 0β1 scale)
β Mission + speaker filtering (indexed in Qdrant)
β Answer or dialogue (scene) output modes
π Web UI
This page can run queries directly when the backend is up:
.venv312/bin/python scripts/08_server.pyThen open http://localhost:8000. The server keeps the corpus and the
embedding model in memory, so web queries skip the per-invocation startup cost the CLI pays.
About Space-Talks
Space-Talks is a Retrieval-Augmented Generation (RAG) system for exploring Apollo mission transcripts.
What It Does
Ask questions about Apollo missions, and get answers sourced directly from mission transcripts. The system uses semantic search to find relevant turns, assembles context from surrounding dialogue, and generates comprehensive answers with LLM generation.
Architecture
- Embeddings: local sentence-transformers/all-MiniLM-L6-v2 (384-dim, runs on CPU β no API)
- Vector Database: Qdrant Cloud (288,609 indexed chunks, cosine)
- LLM Generation: Gemini (gemini-flash-latest)
- Data: 251,500 parsed transcript turns across Mercury, Gemini & Apollo
- Backend: stdlib Python server (scripts/08_server.py) β corpus + model cached in memory
Usage Modes
Answer Mode (default): Get a comprehensive LLM-generated answer sourced from the transcripts.
Dialogue Mode: See raw retrieved turns in dialogue format, chronologically ordered.
CLI Quick Start
python scripts/04_query.py "What caused the Apollo 13 accident?"python scripts/04_query.py "moon landing" --mission as11 --mode dialogueSource Code
Repository: github.com/otrobonita/space-talks
Main query script: scripts/04_query.py
Privacy & Attribution
All data sourced from NASA Apollo mission archives. Transcripts span 1961β1972 covering Mercury, Gemini, and Apollo programs.