make: query / query-dry accept JSON=1 to opt into raw record output
Default `make query Q="..."` now uses the human render. JSON=1 flips to the raw record (same as `aborist query --json` directly): make query Q="who is pikachu?" # human render make query Q="who is pikachu?" JSON=1 # raw JSON record Same flag works on query-dry. Help line updated to advertise it.
This commit is contained in:
parent
31701ad524
commit
0f527b82d7
1 changed files with 6 additions and 6 deletions
12
Makefile
12
Makefile
|
|
@ -139,17 +139,17 @@ burn: bootstrap ## delete a leaf with no children. providence: KEY=<cache_key>;
|
|||
# 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
|
||||
query: bootstrap ## ask the corpus a question [JSON=1 for raw record]; sources picked across shards
|
||||
@if [ -z "$$Q" ] && [ -z "$(Q)" ]; then \
|
||||
echo "usage: make query Q=\"your question\""; exit 2; \
|
||||
echo "usage: make query Q=\"your question\" [JSON=1]"; exit 2; \
|
||||
fi
|
||||
$(ABORIST) --shards-dir $(SHARDS_DIR) query --top-k $(QUERY_TOP_K) "$(Q)"
|
||||
$(ABORIST) --shards-dir $(SHARDS_DIR) query --top-k $(QUERY_TOP_K) $(if $(JSON),--json,) "$(Q)"
|
||||
|
||||
query-dry: bootstrap ## like 'make query' but skip the LLM call (dry-run)
|
||||
query-dry: bootstrap ## like 'make query' but skip the LLM call (dry-run) [JSON=1 for raw]
|
||||
@if [ -z "$$Q" ] && [ -z "$(Q)" ]; then \
|
||||
echo "usage: make query-dry Q=\"your question\""; exit 2; \
|
||||
echo "usage: make query-dry Q=\"your question\" [JSON=1]"; exit 2; \
|
||||
fi
|
||||
$(ABORIST) --shards-dir $(SHARDS_DIR) query --top-k $(QUERY_TOP_K) --dry-run "$(Q)"
|
||||
$(ABORIST) --shards-dir $(SHARDS_DIR) query --top-k $(QUERY_TOP_K) --dry-run $(if $(JSON),--json,) "$(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