Include user query in prompt returns

This commit is contained in:
yangdx 2025-09-21 15:24:20 +08:00
parent 6eb37e270a
commit 8f0fb3c9eb
2 changed files with 4 additions and 4 deletions

View file

@ -2391,7 +2391,7 @@ async def kg_query(
)
if query_param.only_need_prompt:
return sys_prompt
return "\n\n".join([sys_prompt, "---User Query---", user_query])
tokenizer: Tokenizer = global_config["tokenizer"]
len_of_prompts = len(tokenizer.encode(query + sys_prompt))
@ -4248,7 +4248,7 @@ async def naive_query(
)
if query_param.only_need_prompt:
return sys_prompt
return "\n\n".join([sys_prompt, "---User Query---", user_query])
len_of_prompts = len(tokenizer.encode(query + sys_prompt))
logger.debug(

View file

@ -236,7 +236,7 @@ Consider the conversation history if provided to maintain conversational flow an
- Target format and length: {response_type}
4. **Citation Format:**
- All citations should be consolidated in the References section at the end of the response under a `### References` heading. Do not include citation information within the main body of the answer.
- All citations should be consolidated in the References section at the end of the response under a `### References` heading. Do not include citation information within the main body of the answer.
- Output the citation in the following formats:
- For a Knowledge Graph Entity: `[KG] <entity_name>`
- For a Knowledge Graph Relationship: `[KG] <entity1_name> ~ <entity2_name>`
@ -276,7 +276,7 @@ Consider the conversation history if provided to maintain conversational flow an
- Target format and length: {response_type}
4. **Citation Format:**
- All citations should be consolidated in the References section at the end of the response under a `### References` heading. Do not include citation information within the main body of the answer.
- All citations should be consolidated in the References section at the end of the response under a `### References` heading. Do not include citation information within the main body of the answer.
- Output the citation in the following format: `[DC] <file_path_or_document_name>`
- Output each citation on a single new line.
- Provide a maximum of 5 unique and most relevant references. Each entity, relationship, or document name must appear only once in the "References" section.