# Spatial AI (base model)

<figure><img src="/files/aIN0GRR03qW94YZsJaF5" alt=""><figcaption></figcaption></figure>

While pre-trained agents provide quick answers to common tasks, Geolava also supports a flexible inference endpoint, allowing you to make unstructured or more advanced spatial queries. Instead of naming a specific pre-trained Agent (e.g., “valuation”), you can ask the system for certain insights or let it reason about combined data in near-real time.

### Overview

* **Prompt-Style Requests**: Submit a freeform query about properties or entire regions.
* **Contextual Awareness**: The system leverages the underlying Spatial Embedding (including multi-sensor imagery, historical data, and location data).
* **Open-Ended Output**: Get a textual or JSON response describing the system’s best inference.

Like with pre-trained Agents, you can:

* **Specify a single property** or
* **Provide city, state, bounding polygon** or
* **Upload your own data** (multiple addresses) and ask a general question covering them all.

### Endpoint

```
POST /v1/spatial-reasoning
```

*(API design still subject to change.)*

#### Example Request

```json
{
  "prompt": "Identify blighted properties in LA with boarded windows or doors but high sales potential"
}
```

#### Example Response

```json
{
  "insight": "Found 12 candidate properties in Los Angeles that match the description. Four are near downtown with boarded windows, yet valuations are trending upward in these neighborhoods.",
  "matched_properties": [
    {
      "propertyId": "67a771e11bcf52fcce866d6a",
      "attributes_detected": ["boarded windows"],
      "estimated_value": 310000,
      "confidence": 0.82
    },
    {
      "propertyId": "67a771e11bcf52fcce866d6b",
      "attributes_detected": ["boarded doors, broken fence"],
      "estimated_value": 425000,
      "confidence": 0.79
    }
  ],
  "total_matched": 12,
  "notes": "Neighborhood uptrend suggests strong resale demand despite disrepair."
}
```

### Use Cases

1. **Multi-factor Queries** – E.g., “List properties with severe roof damage but near new developments.”
2. **Regional Summaries** – Provide bounding boxes or city definitions: “In these 5 ZIP codes, show me flood-prone properties with stable valuations.”
3. **Hypothetical Questions** – “If an ADU is added, how does that affect the valuation or compliance status?”
4. **Portfolio/Custom Data** – Upload your data set of addresses, then ask: “Which properties in my dataset have known code violations and might be undervalued?”

### Limits & Best Practices

* **Clarity**: The more specific your prompt, the more targeted the analysis.
* **Rate Limits**: This flexible endpoint can be heavier in compute usage. For large data sets, consider region or file-upload strategies.
* **Confidence Scores**: Because it processes queries in a more open-ended manner, parse the included `confidence` or `confidence_score` to gauge reliability.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.geolava.com/api/markdown.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
