mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Make extract relevant information system prompt work for any document
Previously it was too strongly tuned for extracting information from only webpages. This shouldn't be necessary
This commit is contained in:
parent
a39e747d07
commit
a3751d6a04
1 changed files with 8 additions and 8 deletions
|
@ -517,14 +517,14 @@ Assistant:
|
||||||
)
|
)
|
||||||
|
|
||||||
system_prompt_extract_relevant_information = """
|
system_prompt_extract_relevant_information = """
|
||||||
As a professional analyst, your job is to extract all pertinent information from webpages to help answer user's query.
|
As a professional analyst, your job is to extract all pertinent information from documents to help answer user's query.
|
||||||
You will be provided raw text directly from within the web page.
|
You will be provided raw text directly from within the document.
|
||||||
Adhere to these guidelines while extracting information from the provided webpages:
|
Adhere to these guidelines while extracting information from the provided documents:
|
||||||
|
|
||||||
1. Extract all relevant text and links from the webpage that can assist with further research or answer the user's query.
|
1. Extract all relevant text and links from the document that can assist with further research or answer the user's query.
|
||||||
2. Craft a comprehensive but compact report with all the necessary data from the website to generate an informed response.
|
2. Craft a comprehensive but compact report with all the necessary data from the document to generate an informed response.
|
||||||
3. Rely strictly on the provided text to generate your summary, without including external information.
|
3. Rely strictly on the provided text to generate your summary, without including external information.
|
||||||
4. Provide specific, important snippets from the webpage in your report.
|
4. Provide specific, important snippets from the document in your report to establish trust in your summary.
|
||||||
""".strip()
|
""".strip()
|
||||||
|
|
||||||
extract_relevant_information = PromptTemplate.from_template(
|
extract_relevant_information = PromptTemplate.from_template(
|
||||||
|
@ -532,10 +532,10 @@ extract_relevant_information = PromptTemplate.from_template(
|
||||||
{personality_context}
|
{personality_context}
|
||||||
Target Query: {query}
|
Target Query: {query}
|
||||||
|
|
||||||
Web Pages:
|
Document:
|
||||||
{corpus}
|
{corpus}
|
||||||
|
|
||||||
Collate only relevant information from the website to answer the target query.
|
Collate only relevant information from the document to answer the target query.
|
||||||
""".strip()
|
""".strip()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue