Packages
@anvia/pinecone: Usage Patterns
Common ways to compose @anvia/pinecone with adjacent Anvia packages.
Package boundary
@anvia/pinecone owns persistence and search against Pinecone. Application code owns document loading, chunking, embedding, ingestion scheduling, tenant scoping, and when search results are allowed into model context.
The adapter exposes search(...), searchIds(...), asTool(...), and optional inspection behavior through the Anvia vector-store contracts.
Common composition
- Pair with
@anvia/core/embeddingsto create embedded documents before upsert. - Pair with
@anvia/openai,@anvia/gemini,@anvia/fastembed, or@anvia/transformersfor embedding models. - Pair with
AgentBuilder.dynamicContext(...)when every prompt should receive retrieved context. - Pair with
index.asTool(...)when the model should decide whether to search.
Do and do not
Do keep document ids stable across ingestion runs. Do apply metadata filters before results reach the prompt. Do keep vector dimensions aligned with the embedding model.
Do not let agents choose collection names or database credentials. Do not use vector search as the only authorization boundary. Do not assume inspection support exists in every production adapter.
