-
Notifications
You must be signed in to change notification settings - Fork 0
Added docs for PebbloRetrievalQA chain #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use your best judgement to cater these comments.
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%pip install --upgrade --quiet langchain langchain-community langchain-openai qdrant_client" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove %
"\n", | ||
"**PebbloRetrievalQA chain supports the following vector databases:**\n", | ||
"- Qdrant\n", | ||
"- Pinecone\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is pinecone fully supported? just checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
" \"pebblo_semantic_topics\": [\"financial-report\"],\n", | ||
" \"pebblo_semantic_entities\": [\"us-bank-account-number\"],\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be updated?
" llm=llm,\n", | ||
" app_name=\"pebblo-identity-retriever-app\",\n", | ||
" retriever=vectordb.as_retriever(),\n", | ||
" verbose=True,\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
owner, description should be added ?
"source": [ | ||
"auth = {\n", | ||
" \"user_id\": \"[email protected]\",\n", | ||
" \"authorized_identities\": [\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
authorized_identities
in AuthContext
is renamed to user_auth
"> PebbloRetrievalQA is a Retrieval chain with Identity & Semantic Enforcement for question-answering\n", | ||
"against a vector database.\n", | ||
"\n", | ||
"This notebook covers how to retrieve documents using Identity & Semantic Enforcement (Deny Topics/Entities).\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a sentence/link here such as "You can also visit for more details on Pebblo and its SafeRetriever feature"
"### Steps:\n", | ||
"\n", | ||
"1. **Loading Documents:**\n", | ||
"We will load documents with authorization and semantic metadata into an in-memory Qdrant vectorstore. This vectorstore will be used as a retriever in PebbloRetrievalQA.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note here about using PebbloSafeLoader
to load docs with auth & semantic metadata. We want to convey that this chain is best used with PebbloSafeLoader as the counterpart on the ingestion side.
"id": "33a8afe1-3071-4118-9714-a17cba809ee4", | ||
"metadata": {}, | ||
"source": [ | ||
"### Using PromptTemplate to provide additional instructions\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add section number ...
"### Using PromptTemplate to provide additional instructions\n", | |
"### 3. Using PromptTemplate to provide additional instructions\n", |
"source": [ | ||
"### 1. Without semantic enforcement\n", | ||
"\n", | ||
"Since no semantic enforcement is applied, the system should return the answer.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Since no semantic enforcement is applied, the system should return the answer.\n" | |
"Since no semantic enforcement is applied, the system should return the answer without excluding any context due to semantic labels associated with the context..\n" |
734fa6e
to
a2bd828
Compare
a2bd828
to
fc4c4bb
Compare
121e5e8
to
75bac79
Compare
75bac79
to
1ab796b
Compare
Closing this PR as the code/docs changes are merged to Langchain master via langchain-ai#20746 |
Uh oh!
There was an error while loading. Please reload this page.