Closed shreyashankar closed 10 months ago
See https://github.com/shreyashankar/prompteng/blob/main/travelagent.py for a very clunky example of user having to hash the experiment variables.
Possibly, each component state comes with an OpenAI or LLM connection, and we have nice utils to query the LLM (with retry decorators, role the LLM must play, parsing functions, etc). Or we have our own LLMComponent object that users can put in their component states, which encompass roles, parsing functions, etc. LLMComponent objects should not have any data!
LLM role:
Parsing functions:
Goal: for a component, a user should be able to define a dataset, initialize a template in init_state
, iteratively refine a template in a jupyter notebook, and then launch an experiment to find the best prompt template for their dataset. When the component is running in prod, the experiment should be able to run automatically, under the hood.
(Start from a template found by the process above)
dataset
class: wrapper around a dataframe with train, dev, test accessorsConsider always setting batch size to 1? Might be easier to manage tbh
Maybe have a context manager?
inject
params & automatically hash the params to create instance names (to leverage the cache)