Core

Core overview

The most important concept in Dingo is a pipeline. A pipeline is a sequence of building blocks that process data in a pre-defined order. Each block in the pipeline performs a specific task, such as generating prompts, processing responses, or interacting with external services. By combining these blocks, developers can create complex LLM applications for a wide range of use cases.

To connect the blocks together, they must implement a .forward() method that takes three arguments:

  • State: current state of the pipeline. Usually the initial state of the conversational pipelines is the chat history, whereas non-conversational pipelines start with an empty state. The state can either be None, a ChatPrompt, or a KVData object.
  • Context: an immutable dictionary of string keys and values that contains additional pipeline arguments.
  • Store: a mutable store that allows blocks to write any data to be retreived by other blocks later in the pipeline.

Each block can be classified into one of five categories based on the type of state it expects and the type of state it returns:

  • Prompt Builders: generate prompts for the LLM to process.
  • Prompt Modifiers: modify the prompts generated by other blocks.
  • Reasoners: process the prompt and generate a KVData response.
  • Data Modifiers: modify the KVData response generated by other blocks.
  • Special Blocks: do not fit into any of the above categories and perform unique tasks.

Overview

Previous
Quick start