Needle 2 β Email β Calendar Event Extraction
LoRA-fine-tuned Needle 2 (45M) that turns a normal email into a single structured calendar-event candidate.
Given a mail's text it either returns one concrete new event or refuses. It never normalizes dates and never decides who to invite β a deterministic Python layer compiles the temporal phrase and reads the recipients.
E-Mail β extract_event(when, title, location) β EventCandidate
β editierbare Vorschau β Human Approval β (spΓ€ter) Kalender
What it does
- Extracts one concrete new calendar event from an email: a verbatim
temporal phrase (
when), an explicit title (or none) and an optional place. - Refuses (empty call
[]) when there is no single settled event: tentative scheduling, cancellations, reschedules, deadlines, past-event references, questions with a date, or unrelated mail. - Copies, never calculates.
whenis the literal phrase from the message, e.g."am 12. Oktober von 14 bis 16 Uhr"β not an ISO datetime. This keeps date resolution in deterministic, auditable code.
Scope: message text is the only input. No HTML, no attachments, no OCR.
Model details
| Base | Cactus-Compute/needle2 (45M), engine 2 |
| Method | LoRA rank 16 / alpha 32, lr 1e-4, 8 epochs, batch 8, QAT (--qat-bits auto) |
| Export | W4A8 .cact, 13.7 MB (merged) |
| Package | cactus-needle==2.0.13 |
| Languages | German (primary), English |
| Domain | on-device email β calendar extraction |
| Artifact | needle2-r16-e8-s42.cact |
| SHA256 | ccb63964b991e5b15ac2587721b98e40bc49354fd9471d08d8f57952f721656e |
Tool schema (one tool)
extract_event(when: str, title: str = "", location: str = "") -> str
whenβ the complete temporal phrase copied verbatim; all date, clock-time, end-time and timezone evidence that belongs to the event. Date-only is valid (all-day). Never ISO, never calculated.titleβ the event name exactly as written, or empty if the text has none.locationβ the place or meeting medium exactly as written; empty if none.
No event β the model returns an empty function-call list ([]).
Loading
Load with the exact schema above (argument order is part of the training contract):
import needle
tools = [
{"name": "extract_event",
"description": "Use only when the message contains one concrete new calendar "
"event that is already agreed, confirmed or announced.",
"parameters": {"type": "object", "properties": {
"when": {"type": "string"},
"title": {"type": "string"},
"location": {"type": "string"}}}},
]
agent = needle.Needle(tools=tools, system="locale: de-DE",
weights="needle2-r16-e8-s42.cact")
mail = "Betreff: Projektreview\n\nHallo, der Projektreview findet am 12. Oktober " \
"von 14 bis 16 Uhr in Raum 3.14 statt."
agent.complete(mail)["function_calls"]
# [{'name': 'extract_event',
# 'arguments': {'when': 'am 12. Oktober von 14 bis 16 Uhr',
# 'title': 'Projektreview', 'location': 'Raum 3.14'}}]
agent.reset(); agent.complete("Betreff: Termin\n\nPasst dir Dienstag 14 Uhr?")["function_calls"]
# []
The mail is presented as Betreff: <subject>\n\n<body> (message mode). In
selection mode the selected text is passed alone, without the subject.
Intended use
Part of a local-first, human-in-the-loop workflow: the model proposes one candidate, a person reviews/edits it, and only then is anything written. It is designed to be paired with deterministic code that:
- compiles the
whenspan into(start, end, all_day)against the mail's received time (relative phrases like "morgen" resolve there, not against now); - derives invitees from structured
From/To/Ccheaders β the model never selects recipients; - routes timezone/fuzzy phrases to a review step instead of guessing.
Out of scope
Calendar writes, sending mail/invitations, multi-event scheduling, reschedule or cancellation handling, timezone conversion, HTML/attachment parsing, and any network access. The model only classifies and copies evidence from the given text.
Notes
- Fine-tunes built with the Cactus platform keep no trained confidence head;
confidenceis reported asNone. Use explicit review flags instead. - Only German and English were trained. Other languages are untested.
- Trained for short-to-medium business mails; very long newsletters or heavy HTML-to-text artifacts may reduce accuracy.
- Always keep a human approval step before persisting anything.
Model tree for autmoate/needle2-r16-e8-s42
Base model
Cactus-Compute/needle2