@vaicli/vai-workflow-asymmetric-search
v1.0.0
Published
Demonstrate asymmetric retrieval: documents embedded with voyage-4-large, queries embedded with voyage-4-lite. Same embedding space, ~83% query cost reduction.
Maintainers
Readme
vai-workflow-asymmetric-search
Voyage AI's shared embedding space enables ~83% reduction in query-time embedding costs with minimal quality loss. But developers need to see this pattern in action — a clear, minimal workflow that demonstrates the technique.
Install
vai workflow install vai-workflow-asymmetric-searchHow It Works
- Embed — Embed the query with voyage-4-lite (cheapest model)
- Search — Search the collection where documents were embedded with voyage-4-large
- Rerank — Refine results for final relevance ordering
Execution Plan
Layer 1 (parallel): embed_query | vector_search
Layer 2: rerank_resultsExample Usage
vai workflow run vai-workflow-asymmetric-search \
--input query="How do I configure rate limiting for my API?" \
--input collection="api_docs" \
--input limit=5What This Teaches
- The simplest demonstration of the shared embedding space
embed_queryandvector_searchrun in parallel- The output template includes a
notefield that explains the asymmetric pattern - The
inputType: "query"parameter distinguishes query embeddings from document embeddings
License
MIT © 2026 Michael Lynn
