Skip to content

Repository files navigation

Mitos

The thread through your database. One field, any table, the right record.

AI-powered semantic search for FileMaker. Named for Ariadne's thread: one thin line through a tangled structure, straight to the thing at the center.

Point Mitos at a FileMaker Server over OData, let it index your tables, and give your users a single search field that finds the right record in any table. Tolerant of misspellings, nicknames, vague phrasing, and other languages. Results are balanced fairly across tables: search "Canon" and you get Canon cameras from Products, Canonical Systems from Companies, and Mary Cannon from People, without one table drowning out the others.

Sibling of Pythia (reports) and Clio (logs, coming). Runs in your own cloud account, on your bill, under your control. This is the cloud edition; the pure-FileMaker edition is SearchResults AI, a separate project.

Enrichment is the product

Plain embeddings on short text (names especially) are mediocre. Mitos runs a generative pass over every record at index time and every query at search time, expanding each into the things a human might actually type: variant spellings, nicknames, phonetic forms, transliterations into other scripts, synonyms, and per-category price language ("cheap shoes" finds the $45 sneakers, "expensive shoes" finds the $320 oxfords). Both ends of the search get expanded, so the vectors actually carry signal. Everything else in this repo is transport for that trick.

Quick start (no FileMaker required)

Ships with a fictional sample dataset (200 people, 60 organizations, 28 products) with planted edge cases, so you can see it work before touching a server.

cp .env.example .env     # set ANTHROPIC_API_KEY and EMBED_API_KEY
npm install              # postinstall fetches the DuckDB CLI into ./bin
npm start                # loads sample data, background-builds the index
open http://localhost:8080

Try: Shavon Murphy (finds Siobhan Murphy), cheap shoes, heart clinic, Ματίας Ναβάρ. Then run the planted regression cases:

npm run eval             # hit@1 / hit@3 per section

Connecting FileMaker

Set FM_HOST / FM_DB / FM_USER / FM_PASS in .env (a read-access account with the fmodata privilege; OData enabled on the server). Describe your tables in data/config.json using the same shape as tables.config.js (per table: pk, textFields, displayFields, enrichPrompt, optional textJoin), then POST /api/index/sync. Incremental sync uses a UUID PK plus a modification timestamp field, same convention as Pythia.

API

  • GET /api/search?q=...&limit=5&enrich=1 returns { query, expanded, mode, groups, merged, timings }. Display data is copied verbatim from source rows; AI text is never shown as record data. GET so a FileMaker web viewer or Insert From URL can call it with ?key=<password>.
  • POST /api/index/sync starts a build; GET /api/index/stream is the SSE progress feed; GET /api/index/status shows counts and models.
  • POST /api/click records { query, table, record_id } to a JSONL log (the seed of the future learning loop).
  • GET /api/health

How indexing works

Sync (OData, incremental) or sample load, then per table: build a source-text blob from textFields, hash it together with the embed model and the enrichment prompt, and skip every record whose hash is unchanged (re-runs cost nothing). Changed records get enriched (batched calls to claude-haiku-4-5), embedded via the configured provider, and upserted into a flat DuckDB index table with a FLOAT[] vector column. Search is brute-force cosine per table with a window function, which is plenty at sidecar scale.

Embedding providers (set EMBED_PROVIDER): google (gemini-embedding-001, the default), voyage, cohere, openai. Switching providers or editing an enrichment prompt automatically re-indexes exactly the affected rows.

Not in v0 (by design)

The trust-but-verify pass over candidates, the click-driven per-user learning loop, privilege-set filtering, the type-detection front door (dates and amounts routed to lexical find), and more-like-this. The three FileMaker scripts for the cloud edition (search, click beacon, build-found-set) come with the FM integration pass. Deploy scaffolding (Dockerfile, Fly template) is included but v0 is verified locally.

Rules

FileMaker is the source of truth. Zero hallucination on data: the AI never writes anything a user reads as record data. See RULES.md.

About

One search box for a whole FileMaker database. Any table, the right record, even on a nickname, a typo, or the wrong language. The AI heir to fmSearchResults.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages