microsoft / prompty

Prompty makes it easy to create, manage, debug, and evaluate LLM prompts for your AI applications. Prompty is an asset class and format for LLM prompts designed to enhance observability, understandability, and portability for developers.
https://prompty.ai
MIT License
148 stars 9 forks source link

Examples of tool definition and usage. #28

Open Tyler-R-Kendrick opened 1 week ago

Tyler-R-Kendrick commented 1 week ago

Problem statement

My team wants to use prompty tool invocation, but we are having difficulty finding documentation on this feature. We saw that you demoed tool usage around files in the build presentation; but, we didn't see how those tools were defined - or what the limitations of the template syntax were for tool invocation.

Solution Exploration

It appears that jinja2 is specified as the only supported template engine. However, the build demo shows a different template syntax for tool invocation in the yaml portion of a prompty file. The line using string interpolation and file invocation appears to be currently undocumented. It is also unclear if tools other than "file" are able to be registered (or if there are other default tools).

The line I'm referring to reads approx:

sample:
  research: ${file:research.json}

There are many open questions about this syntax. For example:

No information about tool invocation was discovered in the markdown portion of the prompt file. Though jinja template syntax should be sufficient, it is uncertain how tools are loaded for execution in this scenario.

The Ask

Provide documentation to clarify how to provide built-in and custom tool invocation for both the yaml and markdown portions of the prompty file where the scenarios are currently supported.