Skip to content

Instantly share code, notes, and snippets.

@potatoqualitee
Created June 5, 2024 15:24
Show Gist options
  • Save potatoqualitee/3a0554fbab9a73e3f747f733da1198fb to your computer and use it in GitHub Desktop.
Save potatoqualitee/3a0554fbab9a73e3f747f733da1198fb to your computer and use it in GitHub Desktop.
SharePoint Document Categorizer
{
"model": "gpt-4o",
"instructions": "You are a helpful assistant that categorizes legal documents. Extract the content of the attached document and categorize it.",
"name": "Legal Document Categorizer",
"tools": [
{
"type": "function",
"function": {
"name": "categorize_law_document",
"description": "Categorize a law document and extract relevant metadata.",
"parameters": {
"type": "object",
"properties": {
"area_of_law": {
"type": "string",
"description": "What area of law does the document primarily belong to?",
"enum": [
"Criminal Law",
"Civil Law",
"Contract Law",
"Property Law",
"Family Law",
"Labor and Employment Law",
"Intellectual Property Law",
"Tax Law",
"Constitutional Law",
"Administrative Law"
]
},
"document_type": {
"type": "string",
"description": "What type of legal document is this?",
"enum": [
"Case Brief",
"Legal Opinion",
"Contract",
"Statute",
"Regulation",
"Court Filing",
"Legal Memorandum",
"Legal Article",
"Legal News"
]
},
"parties_involved": {
"type": "array",
"items": {
"type": "string"
},
"description": "What are the names of the parties involved in this legal matter?"
},
"court": {
"type": "string",
"description": "Which court or jurisdiction does this document relate to?"
},
"case_number": {
"type": "string",
"description": "What case number is associated with this document, if applicable."
},
"keywords": {
"type": "array",
"items": {
"type": "string"
},
"description": "What are some good keywords or tags for this document?"
}
},
"required": [
"area_of_law",
"document_type",
"parties_involved",
"court",
"case_number",
"keywords"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment