mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 13:33:37 +00:00
Add template for self-query-qdrant (#12795)
This PR adds a self-querying template using Qdrant as a vector store. The template uses an artificial dataset and was implemented in a way that simplifies passing different components and choosing LLM and embedding providers. --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
16
templates/self-query-qdrant/self_query_qdrant/prompts.py
Normal file
16
templates/self-query-qdrant/self_query_qdrant/prompts.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from langchain.prompts import PromptTemplate
|
||||
|
||||
llm_context_prompt_template = """
|
||||
Answer the user query using provided passages. Each passage has metadata given as
|
||||
a nested JSON object you can also use. When answering, cite source name of the passages
|
||||
you are answering from below the answer in a unique bullet point list.
|
||||
|
||||
If you don't know the answer, just say that you don't know, don't try to make up an answer.
|
||||
|
||||
----
|
||||
{context}
|
||||
----
|
||||
Query: {query}
|
||||
""" # noqa: E501
|
||||
|
||||
LLM_CONTEXT_PROMPT = PromptTemplate.from_template(llm_context_prompt_template)
|
Reference in New Issue
Block a user