You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example:
A function executes a query to a database, this query may return no response if there are no rows that matches the filters.
As such, by a naive implementation the result is an empty tuple, instead of the expected n outputs, which raises a validation error.
{"status": {"code": 500, "message": "Error: function return malformed results.\nNumber of output variables (0) does not match number of variables in the schema (7)"}, "data": null}
There are several ways to approach this issue, the first of which is:
Is this an issue? The schema of the function defines n outputs, so if they are missing the output is invalid.
This pushes the problem to the function implementation.
Add a way to mark (and later validate) some output types as optional, as we do with inputs.
This increases the complexity of the validation and the configuration json of the function.
Deal with the with user facing warnings or errors. As the main goal of eidos is to be used to execute AI functions for an LLMs or future AI arquitectures, we can provide function implementers with a common set of Exceptions to define user facing warnings that the LLM can then actuate on.
For example, in the previous example if we send the LLM a response explaining that there is no data on the database to answer the query proposed by the user, it allows the LLM to guide the conversation on how to make the query more relaxed or at least inform the user that there is no relevant data.
The issue of this approach is that it forces functions to import a eidos-defined sdk to identify said exceptions, or use a predefine error, that is later parsed. But then we can enforce the output to always be correct unless a error has been raised.
The text was updated successfully, but these errors were encountered:
Example:
A function executes a query to a database, this query may return no response if there are no rows that matches the filters.
As such, by a naive implementation the result is an empty tuple, instead of the expected n outputs, which raises a validation error.
{"status": {"code": 500, "message": "Error: function return malformed results.\nNumber of output variables (0) does not match number of variables in the schema (7)"}, "data": null}
There are several ways to approach this issue, the first of which is:
Is this an issue? The schema of the function defines
n
outputs, so if they are missing the output is invalid.Add a way to mark (and later validate) some output types as optional, as we do with inputs.
Deal with the with user facing warnings or errors. As the main goal of eidos is to be used to execute AI functions for an LLMs or future AI arquitectures, we can provide function implementers with a common set of Exceptions to define user facing warnings that the LLM can then actuate on.
The text was updated successfully, but these errors were encountered: