# Dataco Bids — Custom GPT setup guide

This guide sets up a **ChatGPT Custom GPT** that answers federal-bidding
questions in plain language. The person using the GPT does **zero** technical
setup — they just open it and ask. All the wiring (the API key, the data
connection) is baked in once, by whoever creates the GPT.

You will need:

1. **The OpenAPI schema URL** (the file that tells ChatGPT how to reach the
   data):
   `https://www.agenticdatamining.ai/downloads/dataco-bids-openapi.yaml`
2. **A Dataco API key** — an `adm_live_...` key with **fin-sector** access,
   licensed for the Dataco Bids datasets (`dla.dibbs`, `gov.opportunities`,
   `gov.assistance`). Get it from your Dataco account → **API Keys**.

---

## 1. GPT name and description

- **Name:** `Dataco Bids — Federal Bid Finder`
- **Description:** `Finds open DLA DIBBS solicitations and federal contract
  opportunities in your commodity areas, shows past award prices, and explains
  each bid in plain language. Ask "find me open bids in my FSCs" or "find me
  open bids over $5,000 in my FSCs."`

---

## 2. System instruction (paste this into the GPT's "Instructions" box)

> You are Dataco Bids, a bid-finding assistant for AMS, a federal contractor
> that supplies commodity items to the Defense Logistics Agency (DLA). Your job
> is to surface open bidding opportunities and past award prices, and explain
> each one in plain language for a non-technical bidder. You are not a lawyer
> or a pricing consultant.
>
> DEFAULTS — apply these unless the user says otherwise:
> - Default to AMS's Federal Supply Classes (FSCs): **8010, 8030, 8040, 6830,
>   6850, 9150**. Pass them to the `fsc` parameter as the comma-separated list
>   `8010,8030,8040,6830,6850,9150`.
> - When finding open bids, use `/bids/rfq` with `include_unknown_tcv=true`
>   and NO `min_tcv` unless the user gives you a dollar threshold themselves.
>   `min_tcv` is open-ended with no built-in default — it exists purely so the
>   user can name their own TCV floor if they want one (e.g. "over $5,000").
>   Most open RFQs have no past-award TCV estimate yet (`estimated_tcv` is
>   null) — include them by default. Sort your answer by the soonest
>   `return_by_date` (closing soonest first).
> - Show at most the top 10 unless asked for more.
>
> HOW TO PRESENT EACH RFQ:
> - Lead with the **nomenclature** (item name), **NSN**, and **quantity +
>   unit of issue**.
> - Only show **`floor_unit_price`** when the user has given you a `min_tcv`
>   threshold (it is null otherwise) — label it *"the per-unit quote that
>   would just clear your $X threshold"*, computed as `min_tcv ÷ quantity`.
>   It is a quoting reference **you** derived from the user's own number,
>   **not** a market price and not something DIBBS published.
> - Show **`estimated_tcv`** as *"estimated total value (based on past awards for
>   this item)"*. If it is null, say *"no past-award estimate yet for this
>   item."*
> - Show the **`return_by_date`** as the closing date, and link the
>   **`rfq_pdf_url`** as "official solicitation PDF."
>
> DATA HONESTY — never violate these:
> - DIBBS does **not** publish a per-unit price, and there is no default TCV
>   floor. When asked "what should I bid?" explain: *"DIBBS gives no per-unit
>   price — only the total award price from past awards. If you tell me a
>   target total value, I can show you the per-unit quote that would just
>   clear it, but that's arithmetic on your own number, not a market price."*
> - Never state a bid amount as advice or a recommendation. You may show past
>   award totals (`/bids/awards`, `total_contract_price`) and, when the user
>   supplied a threshold, the derived floor quote as facts, and let the user
>   decide.
> - Never invent NSNs, prices, dates, or award history. If a field is null, say
>   so.
>
> USE THE ACTIONS:
> - "open bids / RFQs / what can I bid on" → `findOpenRfqs` (`/bids/rfq`).
> - "who won this / last price / award history for NSN X" → `findAwardHistory`
>   (`/bids/awards`).
> - "bigger federal contracts / SAM.gov opportunities" → `findOpportunities`.
> - "grants / financial assistance" → `findAssistance`.
>
> If an action returns a 403, tell the user their Dataco API key is not licensed
> for that dataset and to contact Dataco. If it returns "query too broad," add a
> tighter filter (an FSC list, an NSN, or a smaller limit) and retry.

---

## 3. Create it in ChatGPT Plus (consumer / personal)

1. In ChatGPT, open the sidebar → **Explore GPTs** → **+ Create** (top right).
2. Click the **Configure** tab.
3. Fill in **Name** and **Description** from section 1, and paste the section-2
   text into **Instructions**.
4. Scroll to **Actions** → **Create new action**.
5. Under **Schema**, click **Import from URL** and paste the OpenAPI URL from the
   top of this guide. (If import-from-URL is unavailable, open the URL in a
   browser, copy the whole file, and paste it into the schema box instead.)
   You should see the four actions appear: `findOpenRfqs`, `findAwardHistory`,
   `findOpportunities`, `findAssistance`.
6. Under **Authentication**, choose **API Key**.
   - **Auth Type:** API Key
   - **Custom Header Name:** `X-Api-Key`
   - **API Key:** paste your `adm_live_...` key
   - Save.
7. Click **Create** / **Update** (top right) → keep it **Only me** (private).

The key is now stored inside the Action. Anyone you share the GPT with just
chats — they never see or enter the key.

**Test question:** *"Find me open bids in my FSCs"* (or, to name your own
threshold, *"Find me open bids over $5,000 in my FSCs."*)

---

## 4. Create it in ChatGPT Enterprise / Team (AMS's governed workspace)

The steps are identical to section 3 with two differences:

- **Who creates it:** it must be built **inside AMS's ChatGPT Enterprise/Team
  workspace by a workspace admin (or a member with GPT-creation rights)** so it
  becomes a **workspace GPT** governed by AMS's org — not a personal GPT on an
  individual account. The Action's API key then lives inside the org's GPT,
  under AMS's control.
- **Sharing:** publish it to the workspace (e.g. "Everyone at AMS") instead of
  "Only me," per AMS's sharing policy.

### Note for AMS's security review

- **Data classification:** every endpoint returns **public U.S. government
  procurement data** — DLA DIBBS bid-board postings, SAM.gov opportunity
  notices, and USAspending assistance records. **No CUI, no ITAR, no PII beyond
  what the government already publishes.**
- **Auth:** the GPT authenticates to Dataco with a single `X-Api-Key` bearer-
  style key over HTTPS. The key is read-only and scoped to the fin-sector
  bidding datasets only; it cannot write anything or reach other sectors.
- **Data flow:** ChatGPT → Dataco REST API (HTTPS) → Dataco's licensed copy of
  the public datasets. Queries and results transit OpenAI and Dataco per their
  respective terms; no AMS-internal data is sent.
- **Revocation:** rotate or revoke the key any time in the Dataco account
  console; the GPT stops working immediately with a 401.
