Skip to content

Generating Outputs

Zdenek Kasner edited this page Nov 5, 2024 · 3 revisions

Generating outputs

As described on the Data Management page, we generally assume that you have externally generated model outputs.

However, factgenie also enables you to generate the outputs for your datasets without leaving the web interface!

LLM generation

Generating the outputs is based on prompting LLMs through an API. It is therefore very similar to the process of πŸ€– gathering LLM annotations to which we point for more details.

🚦 Setting up an LLM generation campaign

Setting up the generation campaign is analogous to the evaluation campaign:

  1. Go to the /llm_gen page and click on New LLM campaign.
  2. Insert a unique campaign ID .
  3. Configure the LLM generator.
  4. Select the datasets and splits you want to annotate.

πŸ› οΈ Configuring the LLM generation model

Compared to the evaluation campaign, there is only the following extra field in the configuration dialog:

  • Start with: A string that the model needs to use at the beginning of its generated text.
    • This can be used, e.g., for easier parsing of the model outputs by prefixing them with Here is the answer:\n" and stripping the final quote.

On the contrary, you will not find here the Annotation categories as they are not needed for generation.

πŸ’¬ Configuring the prompt

For including the raw input data in the prompt, use the {data} placeholder.

The model outputs are received as a plain text, so you do not need to provide any specific instructions in the prompt.

πŸ€– Running a LLM generation campaign

You can find (and customize) the campaign files in factgenie/campaigns/<llm-eval-id>.

You can see the generated outputs immediately on the campaign detail page:

LLM generation detail

▢️ Exporting generated outputs

The generated outputs do not automatically appear in the Browse page or among model outputs.

To export the outputs from the campaign, click on Save as model outputs:

LLM generation detail

After filling the setup id, factgenie will make the outputs visible under this id in the browse interface:

LLM generation output

πŸ’» Command line interface

Alternatively, you can create and run a generation campaign from the command line. See the page on command line interface.