Table of Contents

Reference context (llmcpp)

Reference context supplies supporting material separately from system instructions. The documented driver option can attach a specification while generating a function:

$ llmc++ \
    -fllm-context=reference.md \
    -fllm-context=types.md \
    main.cpp -o main

This example assumes those UTF-8 files describe the task. Each occurrence appends a reference, preserving order. Function-level context("file.md") entries follow driver references. Paths resolve from the compiler's working directory.

The task exposes file names and contents through get_task.references. A specification can explain intended behavior while Clang supplies actual declarations and types.

Reference paths and contents participate in cache identity and transcript matching. Changing the specification can therefore trigger generation again. Use append_prompt when the file should add instructions rather than supporting task data.