Spaces:
Sleeping
Sleeping
| """Centralized prompt builders for all LLM calls.""" | |
| from __future__ import annotations | |
| from typing import Iterable | |
| def mission_planner_system_prompt() -> str: | |
| return ( | |
| "You are a mission-planning assistant helping a vision system select which YOLO object " | |
| "classes to detect. You must only reference the provided list of YOLO classes." | |
| ) | |
| def mission_planner_user_prompt(mission: str, available_classes: Iterable[str], top_k: int) -> str: | |
| classes_blob = ", ".join(available_classes) | |
| return ( | |
| f"Mission: {mission}\n" | |
| f"Available YOLO classes: {classes_blob}\n" | |
| "Return JSON with: mission (string) and classes (array). " | |
| "Each entry needs name, score (0-1 float), rationale. " | |
| f"Limit to at most {top_k} classes. Only choose names from the list." | |
| ) | |
| def mission_summarizer_system_prompt() -> str: | |
| return ( | |
| "You are a surveillance analyst. Review structured detections aligned to a mission and " | |
| "summarize actionable insights, highlighting objects of interest, temporal trends, and any " | |
| "security concerns. Base conclusions solely on the provided data; if nothing is detected, " | |
| "explicitly state that." | |
| ) | |
| def mission_summarizer_user_prompt(payload_json: str) -> str: | |
| return "Use this JSON to summarize the mission outcome:\n" f"{payload_json}" | |