Files
2026-05-04 09:50:03 -04:00

32 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
• Added semantic_index/search.sh. It outputs raw JSON from the running HTTP service.
Usage:
semantic_index/search.sh "goods return" customer-service 3
semantic_index/search.sh "candidate follow up" hiring 5 | jq '.results[] | {id, score, citation}'
It defaults to http://127.0.0.1:8787, reads SEMANTIC_INDEX_API_KEY from the environment or semantic_i
ndex/.env, and accepts:
semantic_index/search.sh "query text" [project_identifier] [limit]
Verified:
- Script works against the local service.
- Semantic tests still pass: 49 tests, OK.
- Python compile check passed.
Okay yeah, that's nice and fast
• Good. That script is the right shape for quick manual probing: fast because it avoids Python startup,
plain JSON so it pipes cleanly, and thin enough that it wont hide what the API is returning.
A couple useful examples:
semantic_index/search.sh "goods return" customer-service 3 | jq '.results[].citation'
semantic_index/search.sh "candidate follow up" hiring 5 | jq -r '.results[] | "\(.score)
\(.citation.url) \(.snippet)"'
semantic_index/search.sh "callum@safetagtracking.com" customer-service 3 | jq '.results[0]'