Skip to content

Fix the UniProt prompt, two typos, and a Quick Start that does not work - #176

Merged
adamjohnwright merged 2 commits into
mainfrom
fix/uniprot-prompt-and-typos
Sep 4, 2026
Merged

Fix the UniProt prompt, two typos, and a Quick Start that does not work#176
adamjohnwright merged 2 commits into
mainfrom
fix/uniprot-prompt-and-typos

Conversation

@adamjohnwright

@adamjohnwright adamjohnwright commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Low-risk fixes harvested from three PRs, each verified against current main.

The UniProt prompt describes Reactome citations

- For Reactome always format citations in the following format: ...

In src/retrievers/uniprot/prompt.py — a copy-paste from the Reactome prompt. Reported by @GovindhKishore in #121.

The rest of #121 is prompt tuning rather than a fix: preferring retrieved data over background knowledge, and citing stable identifiers. Both are judgement calls, and the identifier one would tend to make answers longer, which is the opposite of what is currently wanted (see #172). Not taken.

Two spelling fixes

Found by sweeping every prompt string in src/ against a misspelling list:

src/retrievers/uniprot/prompt.py:14      "final asnwer"           -> answer
src/tools/external_search/state.py:12    "LLM generated reponse"  -> response

Those were the only hits for that list. It is a fixed set of ~30 common misspellings, not a dictionary check, so it is a floor rather than a guarantee.

The Quick Start did not work

Which is why #122, #124 and #158 all try to patch these instructions. Three separate people hitting the same wall is a signal the docs are wrong, not that the readers are.

Verified failures:

$ ./bin/embeddings_manager ls-remote
/usr/bin/env: ‘python’: No such file or directory
  • The shebang was #!/usr/bin/env python, which fails outright on a system providing only python3, and the script needs the project dependencies either way. Both bin/ scripts now use python3, and the documented commands use poetry run.
  • PYTHONPATH was to be "verified" rather than set. Nothing sets it, so verifying only tells a new contributor that it is wrong.
  • OPENAI_API_KEY was never mentioned in the Quick Start, so the final step could not work even if everything before it did.

The packaging change (src-layout) will delete most of this by making poetry install sufficient. But three people have filed PRs against these instructions, and the fix should not wait on a refactor.

Closes #121 partially. Addresses the substance of #122, #124 and #158.

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits September 4, 2026 22:07
The UniProt system prompt told the model "For Reactome always format citations",
a copy-paste from the Reactome prompt. Reported by @GovindhKishore in #121. The
rest of that PR is prompt tuning -- preferring retrieved data, citing stable
identifiers -- which is a judgement call rather than a fix, and one of those
changes would tend to lengthen answers, which is the opposite of what is wanted
right now. Not taken.

Two spelling fixes found by sweeping every prompt: "final asnwer" in the UniProt
prompt, and "LLM generated reponse" in the web-search state.

The Quick Start did not work as written, which is why #122, #124 and #158 all
try to patch it:

- step 5 ran `./bin/embeddings_manager`, whose `#!/usr/bin/env python` shebang
  fails outright on a system that provides only `python3`, and which needs the
  project's dependencies either way. Both bin scripts now say `python3`, and the
  documented commands use `poetry run`.
- `PYTHONPATH` was to be "verified" rather than set. Nothing sets it, so
  verifying it tells a new contributor only that it is wrong.
- OPENAI_API_KEY was never mentioned, so the final step could not work.

The packaging change will delete most of this by making `poetry install`
sufficient, but three people have now filed PRs against these instructions and
the fix should not wait on a refactor.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Quick Start said to copy env_template, which sets POSTGRES_*. chat-chainlit
then builds a connection to host postgres:5432 -- real in Docker Compose, absent
on a developer's machine -- and the failure surfaces only on the first message,
not at startup.

So the fix I made to that section reproduced the class of problem it was fixing:
instructions that look right and fail later. It now writes a one-line .env with
just the API key, and says why env_template is for the Docker setup instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 781703c into main Sep 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant