Extract the summary section from a RAG answer
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."
