Nasty.Operations.QA.QAEngine (Nasty v0.3.0)

View Source

Generic Question Answering engine.

Coordinates the full QA pipeline:

  1. Classify question → identify type and expected answer
  2. Score sentences → rank by relevance
  3. Extract candidates → find answers in top sentences
  4. Sort and filter → return top N answers

Summary

Functions

answer(document, question_analysis, config, opts \\ [])

Answers a question from a document.

Options

  • :max_answers - Maximum number of answers to return (default: 3)
  • :min_confidence - Minimum confidence threshold (default: 0.1)
  • :max_sentences - Maximum sentences to extract from (default: 10)

Returns

List of Answer structs, sorted by confidence (highest first)