| --- |
| license: mit |
| language: |
| - en |
| pretty_name: ERP-GPT-EU |
| tags: |
| - soil |
| - soil-science |
| - earth-science |
| - environmental-science |
| - geospatial |
| - rag |
| - tool-augmented-llm |
| - api |
| - llm |
| - retrieval |
| - natural-language-interface |
| - europe |
| --- |
| |
| # ERP-GPT-EU |
|
|
| This repository includes the data and code needed to deploy **[ERP-GPT-EU](https://chatgpt.com/g/g-690a45283b0081918ef79f0d2ab8964e-erp-gpt-eu)**, a tool-augmented GPT for querying and interpreting high-resolution European soil data. |
|
|
| ERP-GPT-EU combines geographic resolution based on European GADM administrative regions with soil data access from the [LUCAS-MEGA](https://huggingface.co/datasets/earthroverprogram/lucas-mega) fused dataset. It can resolve user-specified places or coordinates, retrieve relevant soil properties, and generate soil data outputs through an API server. The GPT is designed for users such as soil scientists, agronomists, land managers, policymakers, and data analysts. |
|
|
| The repository contains both the backend API server and the GPT configuration resources. The API server provides access to local soil and geographic data files, while the `gpt_resources` directory contains the prompt, knowledge file, OpenAPI schema, icon, and starting questions needed to configure the custom GPT. |
|
|
| # Deployment |
|
|
| ## API Server |
|
|
| Install the required Python packages: |
|
|
| ```bash |
| pip install -r requirements.txt |
| ``` |
|
|
| Start the API server: |
|
|
| ```bash |
| python app.py --port=<PORT> |
| ``` |
|
|
| For local debugging, you can expose the server through a temporary public tunnel. For example, using `localtunnel`: |
|
|
| ```bash |
| npx localtunnel --port <PORT> |
| ``` |
|
|
| This will return a public URL such as: |
|
|
| ```text |
| https://your-subdomain.loca.lt |
| ``` |
|
|
| Use this public URL when configuring the GPT action schema. |
|
|
| ## GPT Setup |
|
|
| Go to [ChatGPT](https://chatgpt.com/) and create a custom GPT. |
|
|
| Use the files in `gpt_resources/` to set up the GPT: |
|
|
| ```text |
| gpt_resources/ |
| ├── icon.png |
| ├── knowledge.md |
| ├── prompt.md |
| ├── schema.json |
| └── starts.md |
| ``` |
|
|
| File descriptions: |
|
|
| * `schema.json` (most important): the OpenAPI schema for GPT Actions. In the OpenAI custom GPT setup, this file defines the API endpoints that the GPT can call, including input parameters, response formats, and the public server URL. |
| * `prompt.md` (most important): the top-level instructions for the GPT. In the OpenAI custom GPT setup, this content should be placed in the Instructions field. It defines the GPT's role, behavior, tool-use rules, response style, and constraints. |
| * `knowledge.md`: the knowledge file uploaded to the GPT. In the OpenAI custom GPT setup, this file provides reference material that the GPT can search when answering questions. It should describe the dataset, available soil variables, geographic scope, terminology, and important usage notes. |
| * `icon.png`: icon for the GPT. |
| * `starts.md`: starting questions for users. |
|
|
| Before uploading or pasting `schema.json`, replace the default server URL: |
|
|
| ```json |
| { |
| "servers": [ |
| { |
| "url": "https://api.erp-soilgpt.uk/" |
| } |
| ] |
| } |
| ``` |
|
|
| with your own public API server address, for example: |
|
|
| ```json |
| { |
| "servers": [ |
| { |
| "url": "https://your-subdomain.loca.lt/" |
| } |
| ] |
| } |
| ``` |
|
|
| After saving the GPT configuration, test it with a simple soil or location query to confirm that the GPT can call your API server successfully. |
|
|