Compare commits
3 Commits
feat/kairo
...
3ae5adebed
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ae5adebed | |||
| 9f20110f56 | |||
| d6b541636a |
@@ -15,6 +15,7 @@ LIBRARY_TYPE_CHOICES = [
|
||||
"film",
|
||||
"art",
|
||||
"journal",
|
||||
"email",
|
||||
"business",
|
||||
"finance",
|
||||
]
|
||||
|
||||
@@ -241,6 +241,38 @@ LIBRARY_TYPE_DEFAULTS = {
|
||||
"4) The commercial purpose — positioning, pricing, capability demonstration."
|
||||
),
|
||||
},
|
||||
"email": {
|
||||
"chunking_config": {
|
||||
"strategy": "entry_level",
|
||||
"chunk_size": 512,
|
||||
"chunk_overlap": 32,
|
||||
"respect_boundaries": ["message", "quote", "paragraph"],
|
||||
},
|
||||
"embedding_instruction": (
|
||||
"Represent this email message for retrieval. "
|
||||
"Focus on the sender, recipients, subject, dates, requests and "
|
||||
"commitments made, and the people, organizations, and events discussed."
|
||||
),
|
||||
"reranker_instruction": (
|
||||
"Re-rank email messages based on relevance to the query. "
|
||||
"Prioritize messages matching the correspondents, subject matter, "
|
||||
"time period, and any specific commitments or requests mentioned."
|
||||
),
|
||||
"llm_context_prompt": (
|
||||
"The following excerpts are from personal email correspondence. "
|
||||
"This is private content — answer with discretion. Attribute "
|
||||
"statements to their senders, note dates, and distinguish what was "
|
||||
"asked from what was agreed. Quoted text below a reply is earlier "
|
||||
"context, not the sender's own words."
|
||||
),
|
||||
"vision_prompt": (
|
||||
"Analyze this image from an email message. Identify:\n"
|
||||
"1) Image type (photograph, screenshot, scanned document, chart, signature graphic).\n"
|
||||
"2) What it depicts — people, places, documents, data.\n"
|
||||
"3) Any visible text, dates, or figures.\n"
|
||||
"4) Its role in the message — attachment content, inline illustration, or boilerplate."
|
||||
),
|
||||
},
|
||||
"finance": {
|
||||
"chunking_config": {
|
||||
"strategy": "section_aware",
|
||||
@@ -282,7 +314,7 @@ def get_library_type_config(library_type):
|
||||
|
||||
Args:
|
||||
library_type: One of 'fiction', 'nonfiction', 'technical', 'music',
|
||||
'film', 'art', 'journal', 'business', 'finance'
|
||||
'film', 'art', 'journal', 'email', 'business', 'finance'
|
||||
|
||||
Returns:
|
||||
dict with keys: chunking_config, embedding_instruction,
|
||||
|
||||
@@ -77,6 +77,7 @@ class Library(StructuredNode):
|
||||
"film": "Film",
|
||||
"art": "Art",
|
||||
"journal": "Journal",
|
||||
"email": "Email",
|
||||
"business": "Business",
|
||||
"finance": "Finance",
|
||||
},
|
||||
|
||||
@@ -21,6 +21,7 @@ class LibraryTypeDefaultsTests(TestCase):
|
||||
"film",
|
||||
"art",
|
||||
"journal",
|
||||
"email",
|
||||
"business",
|
||||
"finance",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user