MoreCode writingCode writingdangerAll program-writing chains should be treated as VERY experimental and should not be used in any environment where sensitive/important data is stored, as there is arbitrary code execution involved in using these.Much like humans, LLMs are great at writing out programs, but not always great at executing them. For example, they can write down complex mathematical equations far better than they can compute the results. In such cases, it is useful to combine an LLM with a program runtime, so that the LLM converts unstructured text to a program and then a simpler tool (like a calculator) actually executes the program.In other cases, only a program can be used to access the desired information (e.g., the contents of a directory on your computer). In such cases it is again useful to let an LLM generate the code and a separate tool to execute it.📄️ Causal program-aided language (CPAL) chainThe CPAL chain builds on the recent PAL to stop LLM hallucination. The problem with the PAL approach is that it hallucinates on a math problem with a nested chain of dependence. The innovation here is that this new CPAL approach includes causal structure to fix hallucination.📄️ Bash chainThis notebook showcases using LLMs and a bash process to perform simple filesystem commands.📄️ Math chainThis notebook showcases using LLMs and Python REPLs to do complex word math problems.📄️ LLM Symbolic MathThis notebook showcases using LLMs and Python to Solve Algebraic Equations. Under the hood is makes use of SymPy.📄️ Program-aided language model (PAL) chainImplements Program-Aided Language Models, as in https://arxiv.org/pdf/2211.10435.pdf.PreviousMulti-modal outputs: Image & TextNextCausal program-aided language (CPAL) chain