Spaces:
Sleeping
Sleeping
File size: 1,375 Bytes
4cb2d06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
"""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}"
|