Mirobody
인간 건강의 표준 레지스트리, 약 2천 개 임상·생활 지표를 하나의 언어로 정리
The extraction engine behind Farkad: one sentence about your day, typed, spoken or photographed, becomes health entries you can correct. It shows which AI techniques a shipped product uses, and which it does without. Try it at farkad.web.app.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
The extraction engine behind Farkad: converts sentences, audio, or photos into structured health entries.
farkad.web.app and the mobile apps run this engine. A sentence like "two eggs, a big glass of water, and I slept badly" yields structured entries for food, water, and sleep.
Production installs pinned releases from GitHub Releases. This repository is the pure pipeline; storage, auth, and billing remain in the consumer backend.
Demonstrates production AI techniques, architectural boundaries, and deliberate trade-offs in a shipped health product.README 전문 보기 ↗The AI engine behind Farkad: you say what you ate and did, in your own words and languages, and it becomes structured health entries. I build it in the open to learn applied AI on a real product: each technique below is either used and measured, or left out with the reason.
| You say | It logs |
|---|---|
| شربت كأسين ماء et j'ai couru 5 kilometres | water 2 glasses, 500 ml · exercise run, 5,000 m |
Arabic, then French, in one sentence: each part goes to its topic, and the transcript keeps the words as they were said.
A sentence, a recording or a photo goes through two passes:
Fifteen example sentences, three per language, on seven example topics, replayed from answers
recorded on gemini-3.5-flash-lite on 2026-10-25:
| Language | Routing | Fields | Tokens per sentence (in / out) |
|---|---|---|---|
| English | 100% | 100% | 2,871 / 200 |
| French | 100% | 100% | 2,709 / 194 |
| Arabic | 100% | 100% | 2,170 / 111 |
| Spanish | 100% | 100% | 2,529 / 166 |
| Mixed languages | 100% | 100% | 2,932 / 249 |
| Technique | How it is used here | |
|---|---|---|
| ✅ | Structured output | Every answer is validated against a Pydantic schema |
| ✅ | Multimodal input | Voice and photos, transcribed and routed in one call |
| ✅ | Model cascade | The fast tier first; a topic whose answer fails validation is asked again, of a stronger model or of the same one given time to reason |
| ✅ | Reasoning budget | Chosen per model tier, measured in tokens |
| ✅ | Few-shot examples | Worked examples per topic, in the user's own units |
| ✅ | Long-term memory | Facts the user states, such as "I'm vegan", are given back to every capture as data, never as instructions |
| ✅ | Evaluation with a gold set | Accuracy and tokens per language, above |
| ✅ | Several model providers | Gemini, Claude and GPT behind one interface |
| RAG | A user's memory fits in the prompt | |
| Fine-tuning | Prompts and the gold set iterate faster | |
| Agents and tool calling | A fixed two-step pipeline is cheaper and reproducible | |
| Context caching |
No API key is needed to reproduce the table, or to route one of its sentences:
pip install "farkad-ai @ git+https://github.com/brmel/farkad-ai"
farkad-ai eval
farkad-ai route --text "I drank 500 ml of water"
Your own sentences need a live model: install the google, anthropic or openai extra and
pass --provider vertex, anthropic or openai. A missing credential is named in one line.
pip install "farkad-ai[google] @ git+https://github.com/brmel/farkad-ai"
farkad-ai route --provider vertex --text "two eggs and a glass of water"
In Python, import each name from the module that defines it:
from farkad_ai.pipeline.engine import TwoPassCaptureEngine.
PillarSpec for routing and a TrackedPillar for extraction. Copy one of the
seven in farkad_ai/eval/pillars.py, add sentences to farkad_ai/eval/example_gold.json, and
the eval scores it.farkad_ai/models/anthropic.py;
Contributing lists what it implements.farkad_ai/prompts/assets/; farkad-ai prompts lists them.A new topic or prompt changes what the model is asked, so the eval needs new recordings: Contributing says how.
| The saving does not pay for managing a cache |