ExpertTrace Python SDK
ExpertTrace is an open-source toolkit for eliciting, structuring, and auditing expert judgment. It runs as a deterministic local workflow by default. An optional LLM layer can ask one targeted follow-up when an expert's answer needs more specificity.
Install
Core toolkit, with no runtime dependencies or model calls:
pip install elythera-experttrace
Toolkit plus the LiteLLM adapter:
pip install "elythera-experttrace[llm]"
For local development, clone the repository and use pip install -e . or
pip install -e ".[llm]". The distribution is named
elythera-experttrace; Python imports and the CLI use experttrace.
Deterministic quickstart
from experttrace import InterviewSession
session = InterviewSession(
topic="Reviewing high-risk AI use cases",
domain="AI governance",
owner="AI Governance Council",
)
while not session.is_complete:
prompt = session.current_prompt
session.answer(input(f"{prompt.question}\n> "))
card = session.compile()
print(card.to_json())
print(session.audit().summary())
Adaptive quickstart
Install the llm extra, configure the environment variable required by your
chosen provider, and pass a model:
from experttrace import InterviewSession, LiteLLMProvider
session = InterviewSession(
topic="Reviewing high-risk AI use cases",
llm=LiteLLMProvider("openai/gpt-5"),
max_follow_ups_per_prompt=1,
)
while not session.is_complete:
prompt = session.current_prompt
session.answer(input(f"{prompt.label}\n{prompt.question}\n> "))
print(session.compile().to_json())
LiteLLM supports hosted providers and local runtimes. Model names and credentials follow the selected provider's LiteLLM configuration. Keep credentials in environment variables; never put them in source code or interview answers.
If you already have a model client, adapt it without installing LiteLLM:
from experttrace import CallableLLM, InterviewSession
def decide(system_prompt: str, user_prompt: str) -> dict:
# Call your existing client and return the parsed JSON object.
return {"should_ask": False, "question": "", "reason": "Sufficient detail."}
session = InterviewSession(
topic="Vendor risk review",
llm=CallableLLM(decide),
)
The callback must return should_ask as a boolean plus string question and
reason fields.
CLI
Deterministic mode:
experttrace interview \
--topic "Reviewing high-risk AI use cases" \
--domain "AI governance" \
--owner "AI Governance Council" \
--output knowledge-card.json
Adaptive mode:
export OPENAI_API_KEY="..."
experttrace interview \
--topic "Reviewing high-risk AI use cases" \
--model openai/gpt-5 \
--max-follow-ups 1 \
--output knowledge-card.json
Audit a saved card:
experttrace audit knowledge-card.json
By default, model failures produce a warning and the deterministic interview
continues. Add --strict-llm if a model failure should stop the run.
What the LLM does—and does not do
The optional model evaluates each base answer and may generate one concise follow-up about missing thresholds, exceptions, evidence, or escalation rules. The JSON compilation and quality audit remain deterministic. Expert approval remains explicit; the model never certifies that captured knowledge is true.
Privacy behavior is clear at the integration boundary:
- Deterministic mode sends nothing to a model provider.
- Adaptive mode sends the topic, domain, current question, and current answer to the provider chosen by the user.
- ExpertTrace does not require an Elythera service or account.
Design principles
- Offline and dependency-free by default.
- Portable, reviewable knowledge-card JSON.
- Replaceable interview protocols and model providers.
- Explainable audit findings instead of only a score.
- Model calls are opt-in and degrade gracefully unless strict mode is enabled.
Status
Version 0.1.1 is an alpha research release. It helps structure expert-provided knowledge; it does not replace professional review or establish factual truth.
Licensed under Apache-2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elythera_experttrace-0.1.1.tar.gz.
File metadata
- Download URL: elythera_experttrace-0.1.1.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59898bead932f3505f1edab455f06cd50acb6b571cc615b95ac46a255c19069c
|
|
| MD5 |
477885ec6e3c54c533f30cb4ade0cdd9
|
|
| BLAKE2b-256 |
7054ac10371f5908ff96db2aacb555609c4bc718a9e7708577907e4ac24c9138
|
File details
Details for the file elythera_experttrace-0.1.1-py3-none-any.whl.
File metadata
- Download URL: elythera_experttrace-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b3dea3f333816f5ea34bb7c9c945f871b8c4ed55042cc95364e8a658b222e82
|
|
| MD5 |
eb004c85c15bc6a77759c812a85b70eb
|
|
| BLAKE2b-256 |
f22206eb9deb59ca93b2e12e4585296c1b39d2c83c890cf50c64c207f405c113
|