Skip to content
View as Markdown

tinker.types.PromptProvenanceSpan

class tinker.types.PromptProvenanceSpan()

A run of tokens that were provided as sampling input.

Claims that the covered datum positions are positions [offset, offset + length) of the named sequence's request prompt. Runs tile the field they annotate (see Datum.with_provenance): every position is in exactly one run and position comes from order.

Fields:

  • sequence_id (str) – SampledSequence.sequence_id of a request whose prompt contained this run.
  • offset (int) – Position of the run within that request's prompt.
  • length (int) – Number of consecutive tokens in this run (must be >= 1).