Add framework contract test corpus
This commit is contained in:
2
testdata/framework/fixtures/glossary.yml
vendored
Normal file
2
testdata/framework/fixtures/glossary.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
archive: A catalogued collection of written records.
|
||||
marker: A small label used to classify an entry.
|
||||
2
testdata/framework/fixtures/transcript.md
vendored
Normal file
2
testdata/framework/fixtures/transcript.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Nia labels the archive.
|
||||
The archive receives a blue marker.
|
||||
7
testdata/framework/profiles/contract-fast.yaml
vendored
Normal file
7
testdata/framework/profiles/contract-fast.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
id: contract-fast
|
||||
endpoint: http://localhost:8000/v1
|
||||
model: contract-fast-model
|
||||
temperature: 0.2
|
||||
max_tokens: 500
|
||||
top_p: 1
|
||||
timeout_seconds: 90
|
||||
7
testdata/framework/profiles/contract-quality.yaml
vendored
Normal file
7
testdata/framework/profiles/contract-quality.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
id: contract-quality
|
||||
endpoint: http://localhost:8000/v1
|
||||
model: contract-quality-model
|
||||
temperature: 0.1
|
||||
max_tokens: 1000
|
||||
top_p: 0.9
|
||||
timeout_seconds: 120
|
||||
1
testdata/framework/prompts/contract.markdown_summary.system.md
vendored
Normal file
1
testdata/framework/prompts/contract.markdown_summary.system.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
You summarize synthetic archive notes in clear Markdown.
|
||||
7
testdata/framework/prompts/contract.markdown_summary.user.md
vendored
Normal file
7
testdata/framework/prompts/contract.markdown_summary.user.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Summarize this transcript:
|
||||
|
||||
{{input "transcript"}}
|
||||
|
||||
Optional glossary:
|
||||
|
||||
{{input "glossary"}}
|
||||
20
testdata/framework/prompts/contract.markdown_summary.yaml
vendored
Normal file
20
testdata/framework/prompts/contract.markdown_summary.yaml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
id: contract.markdown_summary
|
||||
version: "1.0.0"
|
||||
default_profile: contract-fast
|
||||
description: Summarize a synthetic transcript in Markdown.
|
||||
inputs:
|
||||
- name: transcript
|
||||
required: true
|
||||
content_type: text/markdown
|
||||
- name: glossary
|
||||
required: false
|
||||
content_type: text/yaml
|
||||
messages:
|
||||
- role: system
|
||||
content_file: ./contract.markdown_summary.system.md
|
||||
- role: user
|
||||
content_file: ./contract.markdown_summary.user.md
|
||||
output:
|
||||
format: markdown
|
||||
validation_mode: basic
|
||||
repair_attempts: 0
|
||||
1
testdata/framework/prompts/contract.structured_events.system.md
vendored
Normal file
1
testdata/framework/prompts/contract.structured_events.system.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Return only JSON that satisfies the requested event schema.
|
||||
7
testdata/framework/prompts/contract.structured_events.user.md
vendored
Normal file
7
testdata/framework/prompts/contract.structured_events.user.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Extract events from this transcript:
|
||||
|
||||
{{input "transcript"}}
|
||||
|
||||
Optional glossary:
|
||||
|
||||
{{input "glossary"}}
|
||||
21
testdata/framework/prompts/contract.structured_events.yaml
vendored
Normal file
21
testdata/framework/prompts/contract.structured_events.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
id: contract.structured_events
|
||||
version: "1.0.0"
|
||||
default_profile: contract-quality
|
||||
description: Extract synthetic events as structured JSON.
|
||||
inputs:
|
||||
- name: transcript
|
||||
required: true
|
||||
content_type: text/markdown
|
||||
- name: glossary
|
||||
required: false
|
||||
content_type: text/yaml
|
||||
messages:
|
||||
- role: system
|
||||
content_file: ./contract.structured_events.system.md
|
||||
- role: user
|
||||
content_file: ./contract.structured_events.user.md
|
||||
output:
|
||||
format: json
|
||||
validation_mode: json_schema
|
||||
schema_path: structured_events.schema.json
|
||||
repair_attempts: 0
|
||||
19
testdata/framework/schemas/structured_events.schema.json
vendored
Normal file
19
testdata/framework/schemas/structured_events.schema.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"required": ["events"],
|
||||
"properties": {
|
||||
"events": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["title"],
|
||||
"properties": {
|
||||
"title": {"type": "string"}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user