2 ms·
We have a bit of context about this in the readme: https://github.com/lastmile-ai/aiconfig#what-problem-it-solves https://github.com/lastmile-ai/aiconfig#what-p
by saqadri 3y ago
We have a bit of context about this in the readme: https://github.com/lastmile-ai/aiconfig#what-problem-it-solves 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/Function-Calling-OpenAI/Function_Calling_with_OpenAI.ipynb https://github.com/lastmile-ai/aiconfig/blob/main/cookbooks/... vs using vanilla openai directly (https://github.com/openai/openai-node/blob/v4/examples/function-call-stream.ts https://github.com/openai/openai-node/blob/v4/examples/funct...)
- throwanem 3y agoYeah, 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!
- saqadri 3y agoPlease 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)
- throwanem 3y agoI 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!
- smy20011 3y agoThank 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.