-
-
Notifications
You must be signed in to change notification settings - Fork 8
Extend resolution search labels and GeoJSON annotations #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,9 +128,13 @@ Use these user-drawn areas/lines as primary areas of interest for your analysis. | |
| 5. **COG Applicability:** Determine if this location would benefit from Cloud Optimized GeoTIFF (COG) analysis for high-precision temporal or spectral data. | ||
| 6. **News Integration:** Reference any recent news or events that may be relevant to the current state of the location. | ||
| 7. **Structured Output:** Return your findings in a structured JSON format including summary, geoJson (if any), news context, and any extracted coordinates or COG information. Use the provided schema. | ||
| 8. **Contextual Labeling:** Produce location-specific and feature-aware labels for the images (\`mapboxImageLabel\`, \`googleImageLabel\`, \`analysisFocus\`). Reference user-drawn features in these labels when they are present. Labels should be concise, uppercase-friendly, and descriptive of the analysis focus. Examples: "Analysis of drawn area: [feature type]", "[Location name] satellite view". | ||
| 9. **Semantic Annotations:** When creating \`geoJson\` features, use Point features for POIs and landmarks, and Polygon features for land areas or regions of interest. Each feature must have a \`name\`, \`featureCategory\`, and \`displayLabel\` matching findings in your summary. Example: Create a Point for identified bridges with name 'Main Street Bridge', category 'infrastructure'. | ||
|
|
||
|
Comment on lines
+131
to
133
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align prompt instruction with schema optionality. The prompt states that each feature "must have" 🔧 Recommended alignment optionsOption 1 (recommended): Update the prompt to reflect optionality: -9. **Semantic Annotations:** When creating \`geoJson\` features, use Point features for POIs and landmarks, and Polygon features for land areas or regions of interest. Each feature must have a \`name\`, \`featureCategory\`, and \`displayLabel\` matching findings in your summary. Example: Create a Point for identified bridges with name 'Main Street Bridge', category 'infrastructure'.
+9. **Semantic Annotations:** When creating \`geoJson\` features, use Point features for POIs and landmarks, and Polygon features for land areas or regions of interest. Each feature must have a \`name\` and should include \`featureCategory\` and \`displayLabel\` when applicable to match findings in your summary. Example: Create a Point for identified bridges with name 'Main Street Bridge', category 'infrastructure', and displayLabel 'Main St. Bridge'.Option 2: Update the schema to make fields required: // In lib/schema/resolution-search.ts
featureCategory: z.enum(['poi', 'land_feature', 'infrastructure', 'drawn_area', 'other'])
.describe('The category of the feature...'),
displayLabel: z.string().describe('A short label for map display or tooltips')(Note: Option 1 is safer since downstream code already handles these as optional with fallbacks.) 🤖 Prompt for AI Agents |
||
| Your analysis should be based on the visual information in the image, the temporal context provided, and your general knowledge. Do not attempt to access external websites or perform web searches beyond what has been provided. | ||
|
|
||
| In your summary, reference annotated features by name (e.g., "I've marked the identified commercial district as a polygon", "The red marker indicates the location of..."). | ||
|
|
||
| Analyze the user's prompt and the image to provide a holistic understanding of the location with full temporal and contextual awareness. | ||
| `; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial | 💤 Low value
Consider stronger typing for feature mapping.
The code uses
(f: any)which reduces type safety. SinceanalysisResultis of typeResolutionSearch(inferred fromresolutionSearchSchema), the features array has a known structure.♻️ Optional improvement for type safety
TypeScript will infer the correct type from the schema, providing better autocomplete and type checking.
📝 Committable suggestion
🤖 Prompt for AI Agents