Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more.
https://anythingllm.com
MIT License
27.59k stars 2.78k forks source link

[FEAT]: Improve instructions for agents skills #1948

Open nicho2 opened 4 months ago

nicho2 commented 4 months ago

How are you running AnythingLLM?

Docker (local)

What happened?

recently, i use mistral nemo instruct for agent skill. and the result is very interesting , I remark just when i ask "the list of document you are access", the json answer is:

{
  "name": "document-summarizer",
  "arguments": {
    "action": "list"
  }
}

the "good" answer is :

{
  "name": "document-summarizer",
  "arguments": {
    "action": "list",
    "document_filename": null
  }
}

I requested to GPT what to do to improve this, it said to add this sentence : " This key must always be present in the response, even if its value is null." in the description of the document-summarizer instructions

"document_filename": { "type": "string", "x-nullable": true, "description": "The file name of the document you want to get the full content of. This key must always be present in the response, even if its value is null." }

I sent the new summarize.js to my docker, and now Nemo give me the good result.

Is-it possible to apply this improvement ?

Are there known steps to reproduce?

No response

timothycarambat commented 4 months ago

Moving this to feat, as it not really a bug, but we should permit nullable keys to not throw a schema issue since in the above example you are correct that a null would not impact the end result so the agent skills need the ability to passthrough schema matches that are functional to be null or missing