The LLM-UI-Objects library provides a set of object components that enable the creation of Large Language Model (LLM)-powered writing interfaces that support object-oriented interaction. Object-oriented interaction can enable users to more flexibly experiment and iterate with LLMs. The objects supported in the library are: Cells (input text fragments), Generators (sets of model parameters), and Lenses (output containers). This library is an instantiation of the Cells, Generators, and Lenses design framework that was presenteed at UIST 2023.
Install by executing npm install llm-ui-objects
.
Refer to directory demo
for examples of how to import and use the components.
Below is an overview of the different components available in the library.
Name | Description | Properties |
---|---|---|
ObjectContextProvider |
Contains necessary context and information on the existing objects, their contents, and properties. Supports management of the objects by providing various helper functions that allow controlling, manipulating, and transferring information between these objects. |
|
Cell |
Represents a text fragment as an object. Cells can be connected to each other to represent a complete text input. |
|
Generator |
Represents a set of model parameter configurations and can be clicked on to generate outputs. Generators can be connected to cells to take its text (and text of all cells connected from that cell) as input. Generators can also be connected to lenses where its generation outputs will be contained and represented. |
|
Lens |
Represents the containers of generated outputs and can represent the outputs in various ways to support exploration of these outputs. Lenses can be connected together by assigning to the same group: lenses in the same group will show the same generated outputs. Examples of these representations are shown in the table below (e.g., ListLens , SpaceLens ) |
|
For the Cell and Lens objects, we also provide a couple of examples of the different forms that these objects can take.
Name | Description | Properties |
---|---|---|
CellBoard |
A board of cells where the user can create multiple rows of cells and multiple cells within these rows. The user selects individual cells in each row to compose an input. |
|
CellTree |
A tree representation of cells where parent-child relationships represent sentences that are continuations to each other. Each cells is minimized: they are represented by a rectangle containing the minimized text for the cell. |
|
CellEditor |
A QuillJS-based text editor that shows the contatenation of multiple selected cells and allows editing of individual cells directly on the editor. |
|
ListLens |
A lens that shows different outputs as a hierarchical list, where outputs are first grouped based on the input that was used to generate them and then grouped based on the model parameter settings used to generate them. |
|
SpaceLens |
A lens that shows different outputs as dots in a 2D space where their position of each output is specified by the getPosition function passed to the component. |
|
PlotLens |
A lens that shows different outputs as dots in a scatter plot where the user can select the axis for the plot, and the value of the dots for each axis are determined by the getRatings function passed to the component. |
|
RatingLens |
A lens that shows the ratings given to each output on multiple dimensions where the ratings of these outputs are determined by the getRatings function passed to the component |
|