Posts

Showing posts with the label GIS

ProCowork: Letting Claude Drive ArcGIS Pro

Image
This past July, I had the pleasure of presenting ProCowork at the Esri User Conference in San Diego. For those who could not make it (or were busy chasing the next session across the convention center), here is the short version of what I showed, and why I built it. I have been playing with GenAI and GIS for a while now. Asking a language model to write ArcPy is old news. What I really wanted was a model that could do the work, on my open project, inside my running ArcGIS Pro session, while I watch. ProCowork is an experimental ArcGIS Pro add-in that puts the Claude Code engine in a dockable chat panel. You type a request, Claude writes the Python, the add-in runs it against the live map, and the code and the results come back into the same panel. So I can type things like: “List the layers in the current map.” “Add a DOUBLE field POP_DEN to Parcels and set it to POP / AREASQMI.” “Select parcels where POP_DEN > 5000 and zoom to...

Nano FEL: GPT-2 and nanoGPT on the North Sea

After LoRA on a 4B model and a 1.2B model on the Mac , I kept asking myself a simpler question. How small can the model be, and how plain can the training loop be, before this North Sea task stops working? So I went back to the basics: GPT-2 medium, 355 million parameters, fully fine-tuned with Andrej Karpathy's nanoGPT . No adapters, no chat template, no grammar, no catalog in the prompt. Just a question in, a JSON query out. That is nanofel . The task is the same FELN translation: a question about wells, pipelines, and discoveries becomes a plan with layers , where , and relations . The twist here is the data format. nanoGPT trains on one flat stream of tokens and samples random windows from it, so each training pair is simply: Q: Which gas wells in Norway are within 2 kilometers of an oil pipeline? A: {"layers":["Wells","Pipelines"], "where":["content_type = cast(2 as SMALLINT) and (country = 'NO')","Pipelin...

FELN Qwen: Train on RTX, Run on Jetson Orin

Image
After teaching a small model to query the North Sea , I wanted to take the experiment onto a Jetson. Could I train on a powerful workstation, then move the model, application, and spatial database onto an NVIDIA Jetson Orin? And could it produce the expected FELN JSON accurately enough to be useful? That is the experiment behind feln-qwen . The job is specific: translate a question about wells, pipelines, and discoveries into FELN. The JSON identifies the layers, their attribute filters, and the spatial relationships between them. Layer order matters. Finding pipelines near discoveries is a different request from finding discoveries near pipelines! A huge thank you to Geodata for the beautiful NorthSea data . It gave this experiment a rich geospatial vocabulary and meaningful relationships to work with. I deeply appreciate the work and care behind this dataset. I chose Qwen3.5-9B and first verified stock-model inference on the Orin. The target machine had to support the model b...

FELN Liquid: Fine-Tuning a GIS Model on a Mac

I have been experimenting with small language models that translate everyday questions into structured GIS queries. With FELN Liquid , I wanted to explore the training side on the Mac itself. Could I take a compact model, teach it the conventions of a North Sea catalog, and complete the experiment locally? The first complete run used LiquidAI's LFM2.5-1.2B-Instruct with LoRA through MLX on an Apple M4 Max. Training took 48 minutes and 37 seconds. Including checkpoint evaluation and the final test, the workflow finished in just under an hour. That is a practical turnaround for trying an idea and inspecting what it learned. The task is familiar from the other FELN projects: turn a request into a JSON plan containing layers , where , and relations . A compact Layers.json catalog accompanies each request, supplying the names, types, aliases, codes, and hints that make the data meaningful. For example, “Show all wells with water depth > 350 meters” should produce: { ...

FELN WebGPU: A Language Model, a Database, and a Map in One Browser Tab

Image
I have been exploring how small language models can turn a plain-English question into a useful GIS query. With FELN LoRA, that meant training a model on a GPU and running it locally on my Mac. For feln-webgpu , I wanted to bring the language model, the database, and the map into the web application itself. Type “Give me all oil discoveries,” and the browser generates a query plan, compiles it to SQL, executes it, and draws the results. The example in the repository finds 562 discoveries, with 200 displayed. We can inspect the plan and SQL beside the map. I like being able to see what the model actually asked the database! The question, query plan, SQL, and resulting features in one browser tab. The pieces are a fine-tuned LiquidAI LFM2-350M model, Transformers.js running on WebGPU, DuckDB-Wasm with its spatial extension, and the ArcGIS Maps SDK for JavaScript. Once the assets have loaded, query generation and database execution happen on the user's machine. There is ...

FELN LoRA: Teaching a Small Model to Query the North Sea

In the FELN RAG experiment , I used a few relevant examples to help a language model translate a question into a spatial query. That got me interested in taking the next step: teaching a small model to do this particular job, then running it locally. I believe small language models have a big role to play in GIS. We have plenty of tasks with a well-defined vocabulary, a known catalog, and a very specific output. Turning a North Sea question into a query over wells, pipelines, and discoveries is one of them. That is the experiment behind feln-lora . The model is NVIDIA's Nemotron-3-Nano-4B, fine-tuned using LoRA and QLoRA through NeMo AutoModel . Training happens on an NVIDIA GPU. The resulting model runs on my Mac through llama.cpp and Metal, with the question staying on the machine. Now the best part: the latest local models produce a query in about 1.2 seconds at the warm median. That is a useful place to start for an interactive GIS workflow :-) Consider this question fr...

FELN RAG: Five Examples and a Spatial Query

Image
Ask a GIS person to find oil wells within five kilometers of gas pipelines and they can start breaking the request into pieces. Which layer contains the wells? How is “oil” encoded? Which pipelines carry gas? What spatial operation connects the two? A language model needs those same details. “Oil” might be a numeric subtype. A country might be stored as a two-letter code. And choosing intersects when the question calls for contains can produce perfectly respectable JSON that asks the wrong question. That is the problem behind feln-rag : give the model a description of the data and a handful of relevant worked examples, then ask it to translate a new request into a structured spatial query. The interesting part is how little machinery the retrieval needs. Start with the query we want to produce The output is FELN, a JSON representation with three main pieces: layers : the primary layer to return, followed by any spatial filter layers. where : one SQL filter per layer, in the s...