QwenLM / Qwen-Agent

Agent framework and applications built upon Qwen>=2.0, featuring Function Calling, Code Interpreter, RAG, and Chrome extension.
https://pypi.org/project/qwen-agent/
Other
3.42k stars 338 forks source link

How to make LLM answer with provided document files only #350

Open shao77622 opened 1 month ago

shao77622 commented 1 month ago

I use prompt like

system = ("Answer the question using the given document only" "If question do not appear in the given document, just answer with 'I don't know'.")

bot = Assistant(
    llm=llm_cfg,
    name='Customer service',
    description="Customer service assistant to solve problems。",
    system_message=system,
    function_list=tools,
    files=[os.path.join(ROOT_RESOURCE, 't.txt')],
)

but If I ask with any thing do not provided in the file, LLM will output the pretrained result.

celalettinbilgen2 commented 1 day ago

Did you find an answer for this?