TypeSafe AI cookbook: line-by-line semantic search scoring 218 lines in one request
hackgoofer · x · 2026-09-17
A new take on context engineering with TypeSafe AI's Jev: selectively pick context-relevant lines instead of stuffing whole documents. The cookbook builds a semantic search over GitHub's Terms of Service in three steps — tag each line with an ID, use a Choice question to rank all 218 line IDs against a plain-language query (probabilities sum to 1, so ranking works even with no true answer), and a Noul question in the same request to detect whether the document contains an answer, with exists thresholds classifying missing vs partial matches. Includes SDK setup and a JsonCache replay mode that runs without an API key.
More from coding & agent
- distilled adds TypeSafe AI SDK: define questions in Effect schema, call ask for structured data — samgoodwin89 · 2026-09-17
- Anthropic FDE explains when enterprises truly need Forward Deployed Engineers — xiaohu · 2026-09-17
- Anthropic FDE Kevin Bai's 'FDE 101' Talk: When Do Companies Actually Need FDEs? — xiaohu · 2026-09-17
- Open-Source Agent Harnesses Like Hermes Matter as Much as Open-Weight Models — granawkins · 2026-09-17
- 90% of enterprise agent pilots fail in production; AGI House hosts one-day sprint on delivery — agihouse_org · 2026-09-17
- Codex builds an iOS app and auto-submits it to the App Store end to end — ezshine · 2026-09-17