Package: ought-ice
Interactive Composition Explorer 🧊ICE is a Python library and trace visualizer for language model programs.ScreenshotExecution trace visualized in ICEFeaturesRun language model recipes in different modes: humans, human+LM, LMInspect the execution traces in your browser for debuggingDefine and use new language model agents, e.g. chain-of-thought agentsRun recipes quickly by parallelizing language model callsReuse component recipes such as question-answering, ranking, and verificationICE is pre-1.0:warning:The ICE API may change at any point.The ICE interface is being actively developed and we may change the API at any point, including removing functionality, renaming methods, splitting ICE into multiple projects, and other similarly disruptive changes. Use at your own risk.RequirementsICE requires Python 3.9, 3.10, or 3.11. If you don't have a supported version of Python installed, we recommend usingpyenvto install a supported Python version and manage multiple Python versions.If you use Windows, you'll need to run ICE inside ofWSL.Getting startedAs part of general good Python practice, consider first creating and activating avirtual environmentto avoid installing ICE 'globally'. For example:python-mvenvvenvsourcevenv/bin/activateInstall ICE:pipinstallought-iceRun the Hello World recipe inthe Primerto see the trace rendered.Optionally, set secrets (like your OpenAI API key) in~/.ought-ice/.env. See.env.examplefor the format. If these are not set, you'll be prompted for them when you run recipes that need them.Developing ICEIf you want to make changes to ICE itself, clone the repository, then install it in editable mode:python-mvenvvenvsourcevenv/bin/activate
pipinstall--upgradepip
pipinstall-e'.[dev]'--config-settingseditable_mode=compat
pre-commitinstall
npm--prefixuici
npm--prefixuirundevIf you're working on the backend, you might find it helpful to remove the cache of language model calls:rm-r~/.ought-ice/cachepre-commitcomplains if your code doesn't pass certain checks. It runs when you commit, and will possibly reject your commit and make you have to fix the problem(s) before you can commit again. (So you should probably use the same commit message you used the first time.)Note that you don't technicallyneedto runpre-commit install, butnotdoing so may cause your commits to fail CI. (Which can be noisy, including by generating commits that will e.g. fix formatting.)StorybookWe useStorybookfor UI tests. You can run them locally:npm--prefixuirunstorybookNote thatbuild-storybookis only for CI and shouldn't be run locally.TerminologyRecipesare decompositions of a task into subtasks.The meaning of a recipe is: If a human executed these steps and did a good job at each workspace in isolation, the overall answer would be good. This decomposition may be informed by what we think ML can do at this point, but the recipe itself (as an abstraction) doesn’t know about specific agents.Agentsperform atomic subtasks of predefined shapes, like completion, scoring, or classification.Agents don't know which recipe is calling them. Agents don’t maintain state between subtasks. Agents generally try to complete all subtasks they're asked to complete (however badly), but some will not have implementations for certain task types.Themodein which a recipe runs is a global setting that can affect every agent call. For instance, whether to use humans or agents. Recipes can also run with certainRecipeSettings, which can map a task type to a specificagent_name, which can modify which agent is used for that specific type of task.Additional resourcesJoin the ICE Slack channelto collaborate with other people composing language model tasks. You can also use it to ask questions about using ICE.Watch the recording of Ought's Lab Meetingto understand the high-level goals for ICE, how it interacts with Ought's other work, and how it contributes to alignment research.Read the ICE announcement postfor another introduction.ContributionsICE is anopen-sourceproject byOught. We're an applied ML lab building the AI research assistantElicit.We welcome community contributions:If you're a developer, you can dive into the codebase and help us fix bugs, improve code quality and performance, or add new features.If you're a language model researcher, you can help us add new agents or improve existing ones, and refine or create new recipes and recipe components.For larger contributions, make an issue for discussion before submitting a PR.And for even larger contributions, join us -we're hiring!How to citeIf you use ICE, please cite:Iterated Decomposition: Improving Science Q&A by Supervising Reasoning Processes. Justin Reppert, Ben Rachbach, Charlie George, Luke Stebbing Jungwon Byun, Maggie Appleton, Andreas Stuhlmüller (2023). Ought Technical Report. arXiv:2301.01751 [cs.CL]Bibtex:@article{reppert2023iterated,author={Justin Reppert and Ben Rachbach and Charlie George and Luke Stebbing and Jungwon Byun and Maggie Appleton and Andreas Stuhlm\"{u}ller},archivePrefix={arXiv},eprint={2301.01751},primaryClass={cs.CL},title={Iterated Decomposition: Improving Science Q&A by Supervising Reasoning Processes},year=2023,keywords={language models, decomposition, workflow, debugging},url={https://arxiv.org/abs/2301.01751}}