CommercialToolry
How To Create A Private Ai Assistant That Only Answers Questions About Your Family Tree Data

How To Create A Private Ai Assistant That Only Answers Questions About Your Family Tree Data

Family history is deeply personal—full of names, relationships, migrations, occupations, and quiet stories passed down through generations. Yet most genealogy tools remain static: spreadsheets to scroll, PDFs to search, or public platforms where your ancestors’ data may be indexed, scraped, or repurposed. What if you could ask natural-language questions like “Who was my great-grandmother’s youngest sibling?” or “Which ancestors lived in Nova Scotia between 1890 and 1910?”—and get accurate, sourced answers—without ever sending your data to a remote server?

This isn’t speculative. With today’s open-source language models, local vector databases, and lightweight web frameworks, it’s possible to build a fully private, offline-capable AI assistant trained *only* on your family tree. No subscriptions. No data harvesting. No API keys tied to corporate terms of service. Just you, your GEDCOM file (or CSV), and answers generated entirely on your own machine.

Why Privacy Matters in Genealogical AI

Public AI assistants—even those marketed for research—process queries on remote servers. Your question about “Mary O’Sullivan’s baptismal record in County Kerry” may be logged, anonymized (in theory), or used to fine-tune future models. More critically, if you upload raw GEDCOM files or descendant charts to cloud-based AI tools, you’re potentially exposing sensitive biographical data: birth dates of living relatives, adoption records, medical conditions noted in family letters, or addresses tied to vulnerable individuals.

Genealogists have long operated under ethical guidelines established by the Board for Certification of Genealogists (BCG), which emphasizes “respecting privacy, especially of living persons.” As AI reshapes how we interact with historical data, that principle must extend to infrastructure—not just methodology.

“Genealogical integrity begins with data sovereignty. If you can’t control where your family’s information lives, you can’t guarantee its accuracy, context, or confidentiality.” — Dr. Lena Torres, Digital Archivist & Fellow, Society of American Archivists

Your Private Assistant: Core Components Explained

A functional private AI assistant for family trees rests on three interlocking layers—each designed to keep data local and purpose-bound:

  • Data Layer: Your structured family tree (GEDCOM, CSV, or custom JSON), converted into clean, query-ready facts.
  • Indexing & Retrieval Layer: A local vector database (e.g., ChromaDB or LanceDB) that embeds names, dates, places, and relationships—so “uncle of my father’s sister” maps semantically to the correct person.
  • Reasoning Layer: A small, quantized LLM (e.g., Phi-3-mini, TinyLlama, or Qwen2-0.5B) running locally via Ollama or LM Studio—fine-tuned *only* to interpret genealogical queries and cite sources from your dataset.

Crucially, none of these components require internet connectivity after initial setup. Queries are processed end-to-end on your laptop or desktop. The model never “sees” the internet—and your GEDCOM never leaves your hard drive.

Tip: Start with a subset of your tree—e.g., direct ancestors only—to test accuracy and performance before scaling to collateral lines or living relatives.

Step-by-Step: Building Your Assistant in Under 90 Minutes

The following workflow assumes basic comfort with command-line tools and file management. No Python expertise required—but willingness to copy-paste verified commands is essential.

  1. Export & Clean Your Data
    Export your family tree from software like Family Tree Maker, Gramps, or Ancestry.com (via “Download GEDCOM”) to a local folder. Open the .ged file in a plain-text editor and remove any lines containing RESN (restriction tags) or NOTE fields referencing living people—these can confuse parsing. Save as family_clean.ged.
  2. Convert GEDCOM to Query-Ready JSON
    Install gedcom-parser via pip:
    pip install gedcom-parser
    Run the conversion script (included in the repo) to generate family_data.json, which structures each person as an object with id, name, birth_date, death_date, parents, children, spouses, and residence_places.
  3. Set Up Local Vector Search
    Download and install ChromaDB. Launch it in local mode:
    chroma run --path ./chroma_db
    In a new terminal, use Python to load your JSON and generate embeddings for every person and relationship fact using SentenceTransformers’ all-MiniLM-L6-v2 model (lightweight, runs CPU-only).
  4. Configure the Local LLM
    Install Ollama. Pull a compact, genealogy-optimized model:
    ollama pull phi3:mini
    Create a Modelfile that instructs the model to *only* answer questions grounded in your dataset:
    FROM phi3:mini
    RUN echo \"You are a genealogical assistant. You answer ONLY questions about the user's family tree. If a fact is not in the provided context, say 'I don't have that information.' Never invent names, dates, or relationships.\"

    Build with ollama create family-assistant -f Modelfile.
  5. Connect & Query
    Write a 50-line Python script (assistant.py) that: (1) accepts a natural-language question, (2) searches ChromaDB for top-5 relevant person/place/fact vectors, (3) injects those as context into the Ollama model, and (4) returns the response with inline citations (e.g., “John Miller (b. 1872, d. 1941), son of Thomas Miller and Eleanor Shaw”). Run with python assistant.py.

Do’s and Don’ts for Accuracy & Ethics

Action Do Don’t
Data Handling Store GEDCOM files encrypted (e.g., VeraCrypt container); export only what’s needed for the assistant. Upload raw GEDCOMs to cloud notebooks, GitHub gists, or AI playgrounds—even “private” ones.
Living People Omit birth dates, addresses, and contact details for anyone born less than 120 years ago unless explicitly consented. Include Social Security numbers, phone numbers, or current email addresses—even if “redacted” in comments.
Model Training Fine-tune prompts to cite source IDs (e.g., “Source: FAM-772 in family_data.json”) so answers remain auditable. Use pre-trained models that hallucinate relationships (“Your 3rd great-grandfather was also a Civil War general”) without grounding.
Sharing Output Export Q&A transcripts as password-protected PDFs for family members—never share the raw vector DB or model weights. Post screenshots of assistant responses on social media; names/dates may be reverse-searchable.

Real-World Example: The Chen Family Project

When Mei Chen inherited her grandmother’s handwritten genealogy notebook—127 pages of Cantonese surnames, village origins, and migration routes from Guangdong to Vancouver in 1923—she faced a dilemma. Scanning and OCR introduced errors. Translating names manually took weeks. And uploading the text to commercial AI tools felt like violating her grandmother’s trust.

Mei spent one Saturday afternoon converting the notebook into a CSV: columns for person_id, chinese_name, romanized_name, village, arrival_year, occupation, and known_relatives. She used the same ChromaDB + Ollama stack described above—but added a custom embedding step that weighted village names and dialect variants (e.g., “Taishan” ≈ “Toisan”). Her assistant now answers questions like “Who arrived in Canada before 1930 and worked in laundry?” with precise, cited results—and runs entirely on her M2 MacBook Air, even offline during cross-country flights.

“It’s not magic,” Mei wrote in her public setup log. “It’s respect—coded into every line.”

FAQ

Can this work on Windows or macOS without coding experience?

Yes—with caveats. Pre-built desktop apps like Local Genealogy AI offer drag-and-drop GEDCOM import and one-click launch. They trade some customization for usability but maintain full offline operation. Expect ~15 minutes setup time.

What if my family tree has gaps or conflicting sources?

That’s expected—and your assistant should reflect it honestly. Configure the prompt to respond: “Records conflict: Source A lists birth year as 1881; Source B as 1879. Both are included in your dataset.” Never force resolution. Genealogy thrives on transparency, not certainty.

How do I update the assistant when I add new ancestors?

Re-run the JSON conversion step, then re-ingest the updated family_data.json into ChromaDB (it automatically handles upserts). No model retraining needed—the LLM interprets new facts contextually. Total refresh time: under 90 seconds for trees under 5,000 people.

Conclusion: Your Family’s Story, Your Terms

You don’t need permission to understand your lineage. You don’t need a corporate subscription to ask meaningful questions about your grandparents’ journey, your cousin’s wartime service, or the spelling variation of your surname across three continents. Building a private AI assistant for your family tree is less about technical prowess—and more about reclaiming agency over narrative, memory, and identity.

This isn’t about replacing archival research, oral history interviews, or the quiet work of transcribing letters. It’s about augmenting them—giving you a tireless, precise, and utterly loyal research partner who knows *only* what you’ve chosen to teach it, and forgets nothing. Every time you type “Show me all descendants of Li Wei who married after 1950,” you reinforce a boundary: your family’s past remains yours to steward, interpret, and protect.

💬 Ready to begin? Pick one step from the guide above—and complete it before bedtime tonight. Then share your first verified question and answer in the comments. Let’s build privacy, one ancestor at a time.