-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Add prompt name to the trace fields #651
Comments
Adding to this, it would also be great if the prompt step also showed the input and output for the prompt generate call |
I believe the appropriate solution to this is to modify the dotprompt plugin so that it calls its defined prompt action when it renders the prompt. This should create a trace span for the prompt rendering step. This is useful to indicate which prompt was used and also to locate any potential bugs in the rendering of the template. |
@maxl0rd I could be confusing things, but will the trace span for the prompt rendering step be different than the one that we currently have when the user is typing into the prompt runner and we're firing off a bunch of generate calls to render the hydrated prompt in the Dev UI? (Those actions of which we're currently filtering out in the list of traces) |
It would be the same action. Are we not writing those traces or not retrieving them? That might be a problem. |
Oh, I think we aren't writing them. Remember #60? :) |
Ok right, the filter only affects |
Ah good call, forgot about the environment distinction there 👍 |
Addressed in this PR #785 Using the action proved to be problematic for a number of reasons. I think the most straightforward approach is for dotprompt to create its own trace spans when rendering prompts. This might seem slightly superfluous with the changes in |
When using prompt files or defined prompts it would be useful to know which prompt was used for a generation
Describe the solution you'd like
[] Add the name of the prompt to the trace data when the prompt is used for a generate call
[] Show the name of the prompt in the developer UI's traces
[] Allow the name of the prompt to be used in filtering in observability tools like Cloud Logging and Firebase AI Monitoring
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context

User request:
Discussed briefly with @pavelgj and @tonybaroneee
The text was updated successfully, but these errors were encountered: