A primitive is a single Python function that is executed as a part of a task. RunLLM comes with 5 default primitives —
generate — and a catch-all
custom primitive that allows you to write arbitrary Python code. Each primitive is strongly typed and comes with a default implementation using state-of-the-art open-source tools like LangChain and Llama Index. Primitives come with sensible defaults for LLM parameters, all of which can be configured; primitives can also be fully customized with bespoke implementations.
This page provides you an overview of each primitive, and the detailed pages for each primitive expand on how to use and customize each one.
embedprimitive allows you to take a piece of text and generate a numerical vector representation for that text.
readprimitive allows you to load data into a RunLLM task.
readcan use one of many off-the-shelf data connectors to SQL systems and document systems.
writeprimitive allows you to persist data to a storage system.
retrieveprimitive allows you to search a vector database for the most relevant documents to a particular piece of text.
generateprimitive allows you to send a prompt to an LLM's generation API.
customallows you to execute arbitrary Python code without type restrictions.