make query Q="..." — canonical CLI for corpus Q&A
Per CLAUDE.md "every workflow lives behind a make target," `aborist` isn't on PATH outside the venv. Add `make query Q="<question>"` and `make query-dry Q="..."` so the user-facing entry point is a make invocation, not a venv path. make query Q="What is anarcho-capitalism?" make query-dry Q="..." # skip the LLM, return context only Override QUERY_TOP_K=N to widen/narrow the source set.
This commit is contained in:
parent
fc039555cc
commit
f747beec4d
1 changed files with 15 additions and 0 deletions
15
Makefile
15
Makefile
|
|
@ -110,6 +110,21 @@ ingest-old-attached: bootstrap fetch-old ## sharded ingest of old history (Phase
|
|||
stats-shards: bootstrap ## cross-shard stats via UNION views over $(SHARDS_DIR)
|
||||
$(ABORIST) --shards-dir $(SHARDS_DIR) stats
|
||||
|
||||
# Multi-source RAG query against the shard cluster.
|
||||
# Usage: make query Q="What is anarcho-capitalism?"
|
||||
QUERY_TOP_K ?= 8
|
||||
query: bootstrap ## ask the corpus a question; sources are picked across shards
|
||||
@if [ -z "$$Q" ] && [ -z "$(Q)" ]; then \
|
||||
echo "usage: make query Q=\"your question\""; exit 2; \
|
||||
fi
|
||||
$(ABORIST) --shards-dir $(SHARDS_DIR) query --top-k $(QUERY_TOP_K) "$(Q)"
|
||||
|
||||
query-dry: bootstrap ## like 'make query' but skip the LLM call (dry-run)
|
||||
@if [ -z "$$Q" ] && [ -z "$(Q)" ]; then \
|
||||
echo "usage: make query-dry Q=\"your question\""; exit 2; \
|
||||
fi
|
||||
$(ABORIST) --shards-dir $(SHARDS_DIR) query --top-k $(QUERY_TOP_K) --dry-run "$(Q)"
|
||||
|
||||
verify-shards: bootstrap ## cross-shard Merkle round-trip on a random sample
|
||||
$(ABORIST) --shards-dir $(SHARDS_DIR) verify -n $(VERIFY_N)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue