flowchart TB
A["1, 2 · A well and its interval<br/>a LAS file; a formation, depths or the whole well"]:::input --> C["3 · A question, in your own words"]:::input
C --> D["Petrophys interprets the well, once"]:::petrophys
D --> E["4 · The model investigates<br/>step by step, on screen"]:::model
E --> F["Code checks every number"]:::record
F --> G["5 · The answer<br/>findings, figures, limits"]:::output
G --> H["6, 7 · Check it, then keep asking<br/>numbers, evidence, logs"]:::input
H --> C
classDef input fill:#ffffff,stroke:#011e3f,color:#011e3f
classDef petrophys fill:#e3f2ee,stroke:#197e6f,color:#0f4f45
classDef record fill:#f0eeea,stroke:#9aa0aa,color:#1c2433
classDef model fill:#e6ecf4,stroke:#011e3f,color:#011e3f
classDef output fill:#fdeee4,stroke:#ef6719,color:#7a3410
The white boxes are yours. The rest runs by itself: Petrophys calculates, the model investigates and writes, code checks and records.
Start the page
export PETROHARNESS_MODEL_URL=http://localhost:8000/v1 # the model server (MODELS.md)
petroharness --launch-ui # opens http://localhost:7860
Installing, and serving a model: Quick start, Models.
1. Choose a well

Drop a LAS file on the page, or click a sample well. This tour clicks 30/6-5: its LAS file and its tops file load together.
On the command line: --las FILE.
2. Choose the interval

Every formation of the tops file is a button. Without a tops file, Give depths instead takes a top and a base, and Whole well asks about the whole log. A named interval gets a more focused answer than the whole well.
On the command line: --tops FILE --formation "BRENT GP.", or --top 2841 --base 2958, or neither for the whole
log (Evaluate a formation).
3. Look at the interpretation (optional)

Petrophys interprets the well before the model reads anything: shale volume, porosity, lithology, water saturation, permeability, net pay. The defaults suit a first question. Change a setting when you know better than the default: a carbonate, a measured Rw, your own cutoffs. The panel previews the zones on your interval before you ask.
On the command line: a field notes file (--field-notes FILE), or /set name=value in a conversation
(Interpretation settings).
4. Ask, and watch the work
Type the question and press Enter. This tour asked:
What are the porosity, water saturation and permeability of the Brent Group, and is any of it hydrocarbon-bearing?

The page fills from top to bottom as the run goes: the well as Petrophys interpreted it, then the work, one block per model call. A finished step shows what it produced: what it looked at, the results it opened and the findings it added or revised. Under them, in grey, are the last lines of the model's reasoning for that call. The call in flight streams its reasoning as the model writes it.
The model first reads the question and says whether it is direct. A direct question (a value, a setting, a fact one or two lookups state) gets a short answer in a minute or two. This one needs an investigation: at most 8 steps, about 15 minutes here.
How to read each line of the work: Read the work. To end a question before it is answered, press Stop: while a question runs, it is the button of the box at the bottom (Stopping a question).
On the command line: petroharness --las FILE ... --question "..." writes answer.md and trace.json when it is
done; the steps are in the trace.
5. Read the answer

When the answer is in, the work folds to one line, and the answer block opens with:
- the answer's opening sentences, with Read the whole answer for the rest;
- the findings, counted and drawn by confidence;
- the computed results the investigation opened;
- the checker's outcome: every number traced to a computed result, or which were not.
Under it come the answer's figures, drawn by Petrophys, then how the answer was reached: the parts the model split the question into, each with its findings, the zone values they rest on, why they matter and what could change them.

On the command line: answer.md in the output folder, with the same text, the figures and the methods and parameters
the answer rests on.
6. Check it
Three ways, from quick to thorough.
A number. Click any number in the answer to see every computed result that shows it. How it was computed then lights its path: the measured logs, the Petrophys steps that computed the curves, the results the model opened, the finding, the answer.

The evidence. The Evidence tab lists each finding with its grade, what weakens it, and the results it rests on, each one click from its full text.

The logs. The Well logs tab shows every curve, marked measured (LAS) or computed by Petrophys. Expand opens the log viewer: zoom to any depth, add any curve of the well as a track, read every curve at a depth.

On the command line: petroharness audit SESSION prints each answer of a conversation with every number's path
back to the LAS file (Audit an answer).
7. Keep asking
The box at the bottom continues the conversation: the next question runs on the same well, interval and settings, and starts from the results already opened.

A conversation can also change course:
- Change a setting from the Interpretation chip; the well is interpreted again from the next question on, and the earlier answers are marked as resting on the earlier settings.
- Ask about another stretch of the well by name or by depth; the question's scope follows it.
- Start a new conversation (top right) with the same well in the chips.
When a question could mean more than one stretch of the well, the harness asks you back instead of guessing, with one button per choice:

On the command line: petroharness chat with the same options (Conversations).
A well without a lithology log
The zones of 30/6-5 are the runs of its lithology log. A well without one is zoned by the lithology Petrophys's mineral solver gives, and the page says so under the well plot: the curves that went in, the solver's domain and method, and the zones that came out. It then asks whether the lithology is right for the well, with buttons that ask the question again under another lithology domain.

The same from the command line
| In the page | Command line | More |
|---|---|---|
| Choose a well | --las FILE |
Evaluate a formation |
| Choose the interval | --tops FILE --formation NAME, or --top D --base D |
Evaluate a formation |
| Change a setting | --field-notes FILE; /set name=value in a conversation |
Interpretation settings |
| Ask | petroharness ... --question "..." |
Command line |
| Watch the work | the steps are in trace.json |
Read the work |
| Read the answer | answer.md |
Records |
| Check a number | petroharness audit SESSION (a conversation's folder) |
Audit an answer |
| Keep asking | petroharness chat |
Conversations |
Where next
- More questions, worked through: Examples.
- Everything on the page: Web UI.
- What each step of the work means: Read the work.
Data: GeoLink, CC BY-SA 4.0.

