Skip to contents

Extract the summary section from a RAG answer

Usage

extract_summary_response(answer)

Arguments

answer

Character scalar LLM answer.

Value

Character scalar summary.

Examples

answer <- paste(
  "## Summary response\nThe source supports the finding.",
  "## Structured data\n```json\n[]\n```",
  sep = "\n\n"
)
extract_summary_response(answer)
#> [1] "The source supports the finding."