Adjust prompt

This commit is contained in:
Nicolas Mowen 2025-08-08 17:54:30 -06:00
parent 9a667f18ba
commit 8cf292a9c2
2 changed files with 8 additions and 6 deletions

View File

@ -95,6 +95,7 @@ class ReviewDescriptionProcessor(PostProcessorApi):
"objects": final_data["data"]["objects"],
"recognized_objects": final_data["data"]["sub_labels"],
"zones": final_data["data"]["zones"],
"timestamp": final_data["end_time"],
},
[r[1] for r in self.tracked_review_items[id]],
)

View File

@ -39,15 +39,16 @@ class GenAIClient:
) -> None:
"""Generate a description for the review item activity."""
context_prompt = f"""
Here is additional context about the scene from a security camera:
The following objects were detected: {review_data['objects']}
The following recognized objects were detected: {review_data['recognized_objects']}
The activity happened in the following zones: {review_data['zones']}
Please analyze the image(s), which are in chronological order, strictly from the perspective of the {review_data["camera"].replace("_", " ")} security camera.
Your task is to provide a **neutral, factual, and objective description** of the scene.
Your task is to provide a **neutral, factual, and objective description** of the scene and the objects interacting with it.
Focus solely on observable actions, visible entities, and the environment.
Here is some information we already know:
- the following activity occurred at {review_data['timestamp'].strftime('%I:%M %p')}
- the following objects were detected: {review_data['objects']}
- the following recognized objects were detected: {review_data['recognized_objects']}
- the activity happened in the following zones: {review_data['zones']}
Your response **MUST** be a flat JSON object with the following fields:
- `scene` (string): A single, comprehensive description of the entire visual scene.
- `action` (string): A single description of any key actions or movements.