Find answers from the community

Home
Members
Antoine
A
Antoine
Offline, last seen 4 months ago
Joined September 25, 2024
how do I add a custom prompt to my query engine? I want to pass in a custom prompt.

Let's say that this is my prompt, how do I pass in the context_str to this?:

custom_prompt_str = (
"Context information is below.\n"
"---------------------\n"
"{context_str}\n"
"---------------------\n"
"Given the context information and not prior knowledge, "
"answer the query.\n"
"Query: {query_str}\n"
"Answer: "
)
27 comments
k
A
Any example how we pass the llamaindex query tool directly to a langchain agent?
3 comments
L
Hi is the langchaindemo missing? I get directed to this link when looking for examples with lagnchain but it seems like the link is deprecated https://github.com/run-llama/llama_index/blob/main/examples/langchain_demo/LangchainDemo.ipynb
15 comments
A
L