Created
August 25, 2023 16:45
-
-
Save czue/81eea58cb718e67be7c57c224800e304 to your computer and use it in GitHub Desktop.
OpenAI function for Source Citations in a RAG architecture
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "answer_and_sources", | |
"description": "Gets an answer and cites the relevant sources used to provide the answer.", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"answer": { | |
"type": "string", | |
"description": "The answer to the user's question.", | |
}, | |
"sources": { | |
"type": "array", | |
"items": { | |
"type": "number", | |
}, | |
"description": "The IDs of any sources which were used in generating the answer.", | |
}, | |
}, | |
"required": ["answer", "sources"], | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment