[Bug] Differing behavior when predicting dicts in UI vs Python library #386
Replies: 3 comments
-
|
We don’t have a CLI - I assume you mean python library? Also: better the judge than the defendant I guess… |
Beta Was this translation helpful? Give feedback.
-
|
You're right - I should say, it happens with the Python library. I can try to isolate a minimal example; right now, it's wrapped in a bit of indirection. Before I do: is there a reason (off the top of your head) why the default running configuration would be different within the library versus the app? |
Beta Was this translation helpful? Give feedback.
-
|
Sounds like a difference between the configs or runtime. The UI is using the library under the hood so some parameter is likely to blame. Might be model, json mode, json prompt generation or other things. Easiest is to point your code at the same kiln task file you are running via UI. That should be aligned. You can also Check the model logs (new option in v0.17, can open the logs folder from settings in the UI). You can compare what’s being called from UI and what’s being called from the UI and spot the difference. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Given a JSON output schema that includes a dict field (such that any keys can be predicted), when generating from the CLI, then the output dict is always empty. When attempting the same in the UI, this is not the case. The UI case is preferable!
Tested this with
google/gemini-2.0-flash-001andopenai/gpt-4o-mini, both via OpenRouter.Checks
To Reproduce
Steps to reproduce the behavior:
{entities: {"judge": "Steve Cosman", "defendant": "John Smith"}}{entities: {}}. This happens for any input text.Expected behavior
A clear and concise description of what you expected to happen.
I expected the CLI behavior to match the UI behavior. Is there a structured prediction setting I'm not enabling in the UI—or one that I can disable from the CLI? I know OAI doesn't let you freely generate dict keys; is this true for other models?
Screenshots
If applicable, add screenshots to help explain your problem.
Error Logs
Please include the logs if the issue shows an error. State that no error is shown if there is no error.
No error
System Information:
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions