mv self-query docs to integrations (#11744)

pull/11761/head
Bagatur 12 months ago committed by GitHub
parent 9e1e0f54d2
commit 8e6fa5f1d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,11 @@
---
sidebar-position: 0
---
# Self-querying retriever
Learn about how the self-querying retriever works [here](/docs/modules/data_connection/retrievers/self_query).
import DocCardList from "@theme/DocCardList";
<DocCardList />

@ -1,5 +1,15 @@
# Self-querying
:::info
Head to [Integrations](/docs/integrations/retrievers/self_query) for documentation on vector stores with built-in support for self-querying.
:::
A self-querying retriever is one that, as the name suggests, has the ability to query itself. Specifically, given any natural language query, the retriever uses a query-constructing LLM chain to write a structured query and then applies that structured query to its underlying VectorStore. This allows the retriever to not only use the user-input query for semantic similarity comparison with the contents of stored documents but to also extract filters from the user query on the metadata of stored documents and to execute those filters.
![](https://drive.google.com/uc?id=1OQUN-0MJcDUxmPXofgS7MqReEs720pqS)
## Get started
We'll use a Pinecone vector store in this example.
For demonstration purposes we'll use a `Pinecone` vector store.
First we'll want to create a `Pinecone` vector store and seed it with some data. We've created a small demo set of documents that contain summaries of movies.
@ -199,3 +209,4 @@ retriever = SelfQueryRetriever.from_llm(
# This example only specifies a relevant query
retriever.get_relevant_documents("What are two movies about dinosaurs")
```

@ -1,9 +0,0 @@
# Self-querying
A self-querying retriever is one that, as the name suggests, has the ability to query itself. Specifically, given any natural language query, the retriever uses a query-constructing LLM chain to write a structured query and then applies that structured query to its underlying VectorStore. This allows the retriever to not only use the user-input query for semantic similarity comparison with the contents of stored documents but to also extract filters from the user query on the metadata of stored documents and to execute those filters.
![](https://drive.google.com/uc?id=1OQUN-0MJcDUxmPXofgS7MqReEs720pqS)
import Example from "@snippets/modules/data_connection/retrievers/self_query/get_started.mdx"
<Example/>

@ -1,8 +1,12 @@
{
"redirects": [
{
"source": "/docs/use_cases/more/agents/autonomous_agents/:path*",
"destination": "/cookbook"
"source": "/docs/modules/data_connection/retrievers/self_query/:path*",
"destination": "/docs/integrations/retrievers/self_query/:path*"
},
{
"source": "/docs/use_cases/more/agents/autonomous_agents/:path*",
"destination": "/cookbook"
},
{
"source": "/docs/use_cases/more/agents/agent_simulations/:path*",

Loading…
Cancel
Save