News for hackers. Stuff that matters.
Re:AIConfig – source control format for gen AI prompts, mode... by saqadri on Friday November 17, 2023 @01:26PM (#38307730)
We have a bit of context about this in the readme: https://github.com/lastmile-ai/aiconfig#what-problem-it-solv.... The main issue with keeping it in code is that it tangles application code with prompts and model-specific logic.

That makes it hard to evaluate the genAI parts of the application, and also iterating on the prompts is not as straightforward as opening up a playground.

Having the config be the source of truth let's you connect it to your application code (and still source controlled), lets you evaluate the config as the AI artifact, and also lets you open the config in a playground to edit and iterate.

For example, compare how much simpler openai function calling becomes with storing the stuff as a config: https://github.com/lastmile-ai/aiconfig/blob/main/cookbooks/... vs using vanilla openai directly (https://github.com/openai/openai-node/blob/v4/examples/funct...)

Re:AIConfig – source control format for gen AI prompts, mode... by throwanem on Friday November 17, 2023 @02:11PM (#38308467)
Yeah, looking at this just briefly it might be the wheel I've (pre)-invented like 1/3 of for one of my couch projects. Definitely can see the appeal of a conventional format here, I'll check it out in more detail when time permits!
Re:AIConfig – source control format for gen AI prompts, mode... by saqadri on Friday November 17, 2023 @02:19PM (#38308626)
Please definitely let me know when you get a chance to try it out! The readme has a link to our discord too if you want to get in touch (and you can email me directly too)
Re:AIConfig – source control format for gen AI prompts, mode... by throwanem on Friday November 17, 2023 @03:01PM (#38309186)
I mean don't get your hopes up too far, it's gonna be a minute :D But I'll pass along what I find when I can!
Re:AIConfig – source control format for gen AI prompts, mode... by smy20011 on Friday November 17, 2023 @08:14PM (#38313525)
Thank you. I think most things we store in the config are non-business logic. Like the connection string of database or some feature flags.

However, the prompt is your business logic in most cases and put your business logic into a separate file make it harder to read and harder to maintain.