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" --verbose
python 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 answer
python 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.py

Then 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.

Loading Field Guide...
Loading Engineering Constitution...
Loading Phase 3 Completion...
Loading Next Priorities...

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 dialogue

Source 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.