cloud: rename ask → query (mirror local 'make query' naming)
usage: make cloud-query Q="your question" [JSON=1] [BUCKET_URL=...] [TOP_K=4] [MAX_CONTEXT=24000] [CACHE_MB=64] / — consistent with the local usage: make query Q="your question" [JSON=1 BURN=1 REPAIR=1 REPROMPTS=N K="extra retrieval keywords" ANSWER_MODE=claim_lattice|claim_lattice_pointer|quote LAYOUT=tail|bookend|per_chunk BROAD=1 REJECT_BROAD=1 ALLOW_BROAD=1 WITNESS=1 XLANG=1 XLANG_MT=1] / entry points. No alias kept (per repo convention against backwards-compat hacks for unused names; this command landed in65b6fe6/cb8c1deduring a fast- iteration burst and has no external consumers yet). CLI: arborist cloud query '...' (was: arborist cloud ask '...') Make: make cloud-query Q='...' (was: make cloud-ask Q='...')
This commit is contained in:
parent
00200b8f55
commit
1b792147c2
3 changed files with 27 additions and 27 deletions
14
Makefile
14
Makefile
|
|
@ -1552,7 +1552,7 @@ wallet-ask: bootstrap ## query the wallet server with your own question [Q="..."
|
|||
SHARD_URL ?= https://nyc3.digitaloceanspaces.com/arborist/clones/virtback/000.db
|
||||
BLOB_BASE ?=
|
||||
|
||||
# BUCKET_URL is the manifest the multi-shard cloud-ask points at. Client
|
||||
# BUCKET_URL is the manifest the multi-shard cloud-query points at. Client
|
||||
# GETs $BUCKET_URL (treated as a manifest URL if it ends in .json, else
|
||||
# appends `clones/manifest.json`) and queries every listed shard.
|
||||
# Default = sidecar-enabled manifest on DO Spaces: per-shard inverted-
|
||||
|
|
@ -1590,17 +1590,17 @@ cloud-fetch-chunk: bootstrap ## fetch + hash-verify one chunk from a bucket [LEA
|
|||
@test -n "$(BLOB_BASE)" || { echo 'BLOB_BASE required (per-chunk blobs/<hash> base URL)'; exit 2; }
|
||||
@$(ARBORIST) cloud fetch-chunk "$(LEAF_HASH)" --blob-base "$(BLOB_BASE)"
|
||||
|
||||
cloud-ask: bootstrap ## bucket-direct end-to-end via manifest [Q="..." JSON=1 BUCKET_URL=... TOP_K=N MAX_CONTEXT=N CACHE_MB=N]
|
||||
@test -n "$(Q)" || { echo 'usage: make cloud-ask Q="your question" [JSON=1] [BUCKET_URL=...] [TOP_K=4] [MAX_CONTEXT=24000] [CACHE_MB=64]'; exit 2; }
|
||||
cloud-query: bootstrap ## bucket-direct end-to-end via manifest [Q="..." JSON=1 BUCKET_URL=... TOP_K=N MAX_CONTEXT=N CACHE_MB=N]
|
||||
@test -n "$(Q)" || { echo 'usage: make cloud-query Q="your question" [JSON=1] [BUCKET_URL=...] [TOP_K=4] [MAX_CONTEXT=24000] [CACHE_MB=64]'; exit 2; }
|
||||
@echo "# bucket: $(BUCKET_URL)" >&2
|
||||
@$(ARBORIST) cloud ask '$(Q)' --bucket-url "$(BUCKET_URL)" \
|
||||
@$(ARBORIST) cloud query '$(Q)' --bucket-url "$(BUCKET_URL)" \
|
||||
--top-k $(or $(TOP_K),4) \
|
||||
--max-context-chars $(or $(MAX_CONTEXT),24000) \
|
||||
--cache-mb $(or $(CACHE_MB),64) \
|
||||
$(if $(JSON),--json,)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Head-to-head: local query (BURN=1) vs cloud-ask, same question, same data.
|
||||
# Head-to-head: local query (BURN=1) vs cloud-query, same question, same data.
|
||||
# ---------------------------------------------------------------------------
|
||||
# Defaults align the two endpoints: LOCAL_DB is the same file that was
|
||||
# uploaded to Spaces under SHARD_URL, so the two paths grind on the
|
||||
|
|
@ -1609,7 +1609,7 @@ cloud-ask: bootstrap ## bucket-direct end-to-end via manifest [Q="..." JSON=1 BU
|
|||
|
||||
LOCAL_DB ?= $(HOME)/.arborist/crawl/web.db
|
||||
|
||||
bench-cloud-vs-local: bootstrap ## head-to-head: local query --burn vs cloud-ask, same question, timed [Q="..."]
|
||||
bench-cloud-vs-local: bootstrap ## head-to-head: local query --burn vs cloud-query, same question, timed [Q="..."]
|
||||
@test -n "$(Q)" || { echo 'usage: make bench-cloud-vs-local Q="your question" [LOCAL_DB=path] [SHARD_URL=https://...]'; exit 2; }
|
||||
@echo "=== bench-cloud-vs-local ==="
|
||||
@echo "Q: $(Q)"
|
||||
|
|
@ -1626,7 +1626,7 @@ bench-cloud-vs-local: bootstrap ## head-to-head: local query --burn vs cloud-ask
|
|||
echo; \
|
||||
echo '--- CLOUD (bucket-direct, always fresh) ---'; \
|
||||
T0=$$(date +%s.%N); \
|
||||
$(ARBORIST) cloud ask '$(Q)' --shard-url "$(SHARD_URL)" --top-k 4 > /tmp/.bench-cloud.json 2>&1 || true; \
|
||||
$(ARBORIST) cloud query '$(Q)' --shard-url "$(SHARD_URL)" --top-k 4 > /tmp/.bench-cloud.json 2>&1 || true; \
|
||||
T1=$$(date +%s.%N); \
|
||||
CLOUD_DT=$$(awk "BEGIN { print $$T1 - $$T0 }"); \
|
||||
$(PY) -c "import json; d=json.load(open('/tmp/.bench-cloud.json')); print('answer: ', d.get('answer_text','').strip()[:200]); print('audit: ', d.get('audit_mode')); print('verifier: ', d.get('verifier_method')); print('n_verified:', d.get('n_verified'), '/', d.get('n_quotes')); s=d.get('sources') or []; print('sources: ', len(s), '→', s[0]['document_uri'] if s else '(none)'); st=d.get('stats') or {}; print('http_reqs: ', st.get('http_requests')); cs=st.get('cache') or {}; print('bytes: ', cs.get('bytes_fetched'))"; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue