Comments (3)
Hi @DataVigi, you did not clarify which endpoint you wish to add this functionality but I am assuming it is either chat/completions
or context/query
route. If it was for /chat/completions
route, adding metadata would break the compatibility with the existing OpenAI compatible clients. We want to be fully compatible in order to ease the transition for our users. If it was for the context/query
endpoint, then you can attach the metadata filter to each query you send. Having said that we also have another way of overriding the global_metadata_filter using the config. (context_engine/params/global_metadata_filter).
In any case I would be glad to know more about your use-case and let's examine whether it is solvable with the existing functionality.
from canopy.
@DataVigi As @izellevy has mentioned, in a chat mode you can set a global metadata filter for all queries, using the Canopy config. That's on top of the /context/query
API that supports passing a filter for every individual query.
If you want the the ChatBot to dynamically "decide" on a metadata filter according to chat conversation contents - either by LLM reasoning or by pre-defined logic - this is the responsibility of the QueryGenerator
.
You can either modify the prompt of the query generator in the config file, or you can also derive a new QueryGenerator
class and add your logic there.
from canopy.
Hey @igiloh-pinecone how would making a custom query generator entail exactly? That would mean making a class based on the QueryGenerator class, but how could that be then configured so that the chatengine for example uses the configured one? I can't seem to find any information on how that sort plugin system would work... Happy to contribute to the docs!
from canopy.
Related Issues (20)
- [Bug] CORS preflight headers - OPTIONS method not allowed
- [Feature] Support "GET" operations for the knowledge base HOT 2
- [Feature] Obtain F score directly from the chat engine HOT 1
- [Bug] Pydantic V2 is not compatible HOT 1
- [Bug] No debug context available when setting CE_DEBUG_INFO=true HOT 6
- [BUG] Sudden deterioration in chat bot answers after installing Canopy 0.7.0 HOT 11
- [Bug] Canopy cannot find the index created HOT 2
- [Bug] Upsert in Starter is Failing due to deletion HOT 4
- Please update tiktoken > 0.4 for canopy-sdk
- [Feature] Return context while calling the chat/completions
- [Bug] Initializing KnowledgeBase with AzureOpenAIEncoder encoder gives error: Exception: TypeError: record_encoder must be an instance of RecordEncoder, not <class 'pinecone_text.dense.openai_encoder.AzureOpenAIEncoder'> HOT 1
- [Bug] Context window is too large HOT 4
- [Bug] Knowbase seem to be disconnected, LLM is responding I don't know
- [Bug] Fail to start canopy server: Vector dimension 1536 does not match the dimension of the index 3072 HOT 2
- [Feature] Anthropic support HOT 1
- [Bug] Can't install Canopy SDK HOT 1
- [Notice!] gcp deployment document
- Package Conflict
- [Bug] Failed to create index HOT 2
- Persistent error message "Bad request: Your free plan does not support indexes in the us-west-2 region of aws" while trying to use "canopy new" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canopy.