Skip to content

Commit 04c3b47

Browse files
committed
chore(terminology): address review findings from #1256
Four user-facing error strings in adapter.py still said "intrinsic" as prose, directly violating issue #1192 criterion #4 ("Done when: no 'intrinsic' prose remains in the five Phase 0 files"). Sweep the four f-strings: - "Intrinsic '{name}' not available as an adapter of type …" - "io.yaml for intrinsic '{name}' …" - "No adapter found for intrinsic '{name}' in {path}" (×2) Sweep remaining user-visible prose in two other files: - openai.py:582 — "has no adapter for processing intrinsic: …" - rag.py:206 — "Citation generation intrinsic failed: …" Fix openai.md section heading ("## Intrinsics with Granite Switch" → "## Adapter functions with Granite Switch") — body was swept in prior commit but heading was missed, leaving the section self-contradictory. Sweep intrinsics.md page title and body prose (title, opening paragraph, backend-note callout, reuse-note, Direct-usage heading, catalog reference) to use "adapter functions" throughout. File slug rename is deferred to Phase 4 (#1144); the page content is swept here to keep it consistent with the cross-references that now point to it as "Adapter functions". Fix three remaining safety-guardrails links without .md suffix in common-errors.md and the lora-and-alora-adapters link in prefix-caching-and-kv-blocks.md. Assisted-by: Claude Code Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
1 parent 4e9646b commit 04c3b47

7 files changed

Lines changed: 20 additions & 20 deletions

File tree

docs/docs/advanced/intrinsics.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Intrinsics"
2+
title: "Adapter functions"
33
description: "Adapter-accelerated RAG quality checks using LoRA/aLoRA adapters with Granite models."
44
# diataxis: how-to
55
---
@@ -8,22 +8,22 @@ description: "Adapter-accelerated RAG quality checks using LoRA/aLoRA adapters w
88
Silicon Mac recommended), or `pip install mellea` for OpenAIBackend with a
99
[Granite Switch](/reference/glossary#granite-switch) model served via vLLM.
1010

11-
Intrinsics are adapter-accelerated operations for RAG quality checks. They use
11+
Adapter functions are adapter-accelerated operations for RAG quality checks. They use
1212
LoRA/aLoRA adapters loaded directly into the HuggingFace backend — faster and more
1313
reliable than prompting a general-purpose model for these specialized micro-tasks.
1414

15-
> **Backend note:** Intrinsics work with two backends:
15+
> **Backend note:** Adapter functions work with two backends:
1616
>
1717
> - **LocalHFBackend** — loads LoRA/aLoRA adapters from the catalog at runtime.
18-
> All intrinsics are available. Requires a GPU or Apple Silicon Mac.
18+
> All adapter functions are available. Requires a GPU or Apple Silicon Mac.
1919
> - **OpenAIBackend** — uses a Granite Switch model served via vLLM with
20-
> `load_embedded_adapters=True`. Only intrinsics embedded in the model are
20+
> `load_embedded_adapters=True`. Only adapter functions embedded in the model are
2121
> available — check the model's `adapter_index.json` for the list.
2222
> See `docs/docs/examples/granite-switch/README.md`
2323
>
24-
> Intrinsics do not work with Ollama or other remote backends.
24+
> Adapter functions do not work with Ollama or other remote backends.
2525
26-
Set up the backend once and reuse it across intrinsic calls:
26+
Set up the backend once and reuse it across adapter function calls:
2727

2828
```python
2929
# Requires: mellea[hf]
@@ -209,7 +209,7 @@ print(result)
209209
# Maps each response sentence to supporting document sentences
210210
```
211211

212-
## Direct intrinsic usage
212+
## Direct adapter function usage
213213

214214
> **Advanced:** For custom adapter tasks, use the `Intrinsic` component and
215215
> `CustomIntrinsicAdapter` directly.
@@ -249,7 +249,7 @@ print(out) # {"requirement_likelihood": 1.0}
249249

250250
The `Intrinsic` component loads aLoRA adapters (falling back to LoRA) by task name.
251251
For OpenAI backends with Granite Switch, adapters are loaded from the model's
252-
HuggingFace repository configuration instead of the intrinsic catalog.
252+
HuggingFace repository configuration instead of the adapter function catalog.
253253
Output format is task-specific — `requirement-check` returns a likelihood score.
254254

255255
---

docs/docs/advanced/prefix-caching-and-kv-blocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ reused.
133133

134134
**See also:** [HuggingFace Transformers](../integrations/huggingface) |
135135
[Adapter functions](./intrinsics.md) |
136-
[LoRA and aLoRA Adapters](./lora-and-alora-adapters)
136+
[LoRA and aLoRA Adapters](./lora-and-alora-adapters.md)

docs/docs/integrations/openai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ m = MelleaSession(
258258
> LiteLLM provides a verified integration — see
259259
> [Backends and Configuration](../how-to/backends-and-configuration).
260260
261-
## Intrinsics with Granite Switch
261+
## Adapter functions with Granite Switch
262262

263263
Granite Switch models embed LoRA/aLoRA adapters directly in the model weights.
264264
When served via vLLM, these adapters enable adapter functions (RAG quality

docs/docs/troubleshooting/common-errors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ nest_asyncio.apply()
215215
Guardian adapter functions (`guardian_check()`, `policy_guardrails()`,
216216
`factuality_detection()`, `factuality_correction()`) require `LocalHFBackend`
217217
with an IBM Granite model.
218-
See [Safety Guardrails](../how-to/safety-guardrails) for full usage.
218+
See [Safety Guardrails](../how-to/safety-guardrails.md) for full usage.
219219

220220
### `guardian_check()` returns unexpected scores
221221

@@ -234,7 +234,7 @@ Use the Guardian adapter functions instead
234234
```
235235

236236
Replace `GuardianCheck` / `GuardianRisk` imports with the Guardian adapter functions API.
237-
See [Safety Guardrails](../how-to/safety-guardrails) for migration guidance.
237+
See [Safety Guardrails](../how-to/safety-guardrails.md) for migration guidance.
238238

239239
---
240240

@@ -250,4 +250,4 @@ See [Safety Guardrails](../how-to/safety-guardrails) for migration guidance.
250250
**See also:**
251251
[Quick Start](../getting-started/quickstart) |
252252
[Inference-Time Scaling](../advanced/inference-time-scaling) |
253-
[Safety Guardrails](../how-to/safety-guardrails)
253+
[Safety Guardrails](../how-to/safety-guardrails.md)

mellea/backends/adapters/adapter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def __init__(
126126

127127
if adapter_type not in self.intrinsic_metadata.adapter_types:
128128
raise ValueError(
129-
f"Intrinsic '{intrinsic_name}' not available as an adapter of type "
129+
f"Adapter function '{intrinsic_name}' not available as an adapter of type "
130130
f"'{adapter_type}. Available types are "
131131
f"{self.intrinsic_metadata.adapter_types}."
132132
)
@@ -390,7 +390,7 @@ def from_model_directory(
390390
io_config_path = model_path / io_config_rel
391391
if not io_config_path.exists():
392392
raise ValueError(
393-
f"io.yaml for intrinsic '{entry_name}' "
393+
f"io.yaml for adapter function '{entry_name}' "
394394
f"not found at {io_config_path}"
395395
)
396396

@@ -408,7 +408,7 @@ def from_model_directory(
408408
if not adapters:
409409
if intrinsic_name is not None:
410410
raise ValueError(
411-
f"No adapter found for intrinsic '{intrinsic_name}' in {model_path}"
411+
f"No adapter found for adapter function '{intrinsic_name}' in {model_path}"
412412
)
413413
raise ValueError(f"No adapters found in {model_path}")
414414

@@ -465,7 +465,7 @@ def from_hub(
465465
except ValueError as e:
466466
if intrinsic_name is not None:
467467
raise ValueError(
468-
f"No adapter found for intrinsic '{intrinsic_name}' in {repo_id}"
468+
f"No adapter found for adapter function '{intrinsic_name}' in {repo_id}"
469469
) from e
470470
raise ValueError(f"No adapters found in {repo_id}") from e
471471

mellea/backends/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ async def _generate_from_intrinsic(
579579
)
580580
if adapter is None:
581581
raise ValueError(
582-
f"backend ({self}) has no adapter for processing intrinsic: "
582+
f"backend ({self}) has no adapter for processing adapter function: "
583583
f"{action.intrinsic_name}"
584584
)
585585

mellea/stdlib/requirements/rag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ async def validate(
203203
)
204204
except Exception as e:
205205
return ValidationResult(
206-
False, reason=f"Citation generation intrinsic failed: {e!s}"
206+
False, reason=f"Citation generation adapter function failed: {e!s}"
207207
)
208208

209209
# Step 2: Citation Necessity

0 commit comments

Comments
 (0)