Documentation
¶
Overview ¶
Package ask answers a natural-language question from the team's own knowledge: it retrieves the relevant notes (the graph) plus the relevant code symbols (the code index), hands them to the BYOAI LLM as the ONLY allowed context, and returns the answer with citations. The conversational second brain, grounded in the vault, no hallucinated facts. Reuses the retriever + code index + llm.Client (claude -p).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Citation ¶
type Citation struct {
N int `json:"n"`
Kind string `json:"kind"` // note | code
ID string `json:"id"`
Title string `json:"title"`
Loc string `json:"loc"` // note path or file:line
}
Citation is a source the answer drew on, by its [N] number in the context.
type Result ¶
Result is the grounded answer plus the sources it was given.
func Answer ¶
func Answer(ctx context.Context, rtr *retrieve.Retriever, store *index.Store, client llm.Client, question string, budget int, allowedScopes map[string]bool) (Result, error)
Answer retrieves notes + code for the question, asks the LLM grounded on them, and returns the answer with the cited sources. allowedScopes (nil = unrestricted) keeps a scoped caller's answer within their readable notes.