Spaces:
Sleeping
Sleeping
Commit History
-
Per-turn telemetry + RAG few-shot on phrasebook miss
jefffffff9Telemetry (src/engine/turn_logger.py) Thread-safe JSONL append logger writing one self-contained row per turn to data/field_turns.jsonl (overridable via FIELD_TURNS_PATH). Captures ts, tab, langs, transcript/user_text, phrasebook hit details, llm model + ms, reply, tts ms, total ms, error. Foundation for field-test review, phrasebook hit-rate measurement, and Stage-4 training-data curation. Never raises — telemetry must not break the user-facing pipeline. RAG few-shot (src/llm/phrasebook.py + src/llm/minimal_client.py) - phrasebook.top_k(text, lang, k=3): nearest-K phrasebook entries regardless of threshold, sorted by descending fuzzy score. - MinimalClient.chat() now accepts extra_examples; _build_system_prompt appends them as a second 'Additional reference phrases relevant to the current user input' section after the 30-pair anchor list. app_minimal.py - Both run_pipeline (voice) and run_text_pipeline (text) now share a single _resolve_reply() help…064d08b