CommBus.Assembler (CommBus v0.1.0)

Copy Markdown View Source

Prompt assembly with injected context.

Summary

Functions

Assembles a prompt from the given conversation and context entries, applying keyword matching, budget fitting, and section allocation.

Functions

assemble_prompt(conversation, entries, opts \\ [])

@spec assemble_prompt(CommBus.Conversation.t(), [CommBus.Entry.t()], keyword()) ::
  map()

Assembles a prompt from the given conversation and context entries, applying keyword matching, budget fitting, and section allocation.

Parameters

  • conversation — A %CommBus.Conversation{} with message history.
  • entries — List of %CommBus.Entry{} structs to consider for injection.
  • opts — Keyword options forwarded to CommBus.Context.plan/3, including :budget, :scan_depth, :recency_decay, and :methodologies.

Returns

A map with keys :sections, :included_entries, :excluded_entries, :token_usage, :match_diagnostics, and :match_context.