Engineering notes · Work in progress

How my assistant works.

Can a visitor understand my engineering work and inspect the evidence behind an answer?

Notes

What I decided, and why

Note 1

The implementation

A Next.js interface sends bounded conversation history to a server endpoint. Qdrant retrieves curated passages; an OpenAI model hosted on Azure returns a structured answer. The server checks response structure and reference IDs before displaying the answer.

Note 2

Decisions and tradeoffs

Answers appear after validation rather than exposing partially formed structured output. Progress messages distinguish retrieval from generation. The standard OpenAI SDK keeps endpoint, credentials, and deployment configurable. Corpus replacement uses a staged collection so failed ingestion does not delete the working corpus.

Note 3

Evaluation

The original seven-question evaluator could pass an HTTP error containing matching keywords. The revised checks require successful responses, a valid answer contract, expected facts, and appropriate references. Offline regression tests exercise failure handling. These checks are a baseline, not proof of factual correctness.

Note 4

Known limitations

References are curated claims, not independent evidence. Source membership does not establish that every claim follows from a passage. Follow-up retrieval uses recent user questions; topic changes can still reduce relevance. The assistant cannot inspect code or browse the web, and has no autonomous tools.

The parts

What it’s made of

I am a retrieval-augmented portfolio assistant with bounded conversation context, inspectable reference passages, and explicit failure handling. I am not an autonomous agent and cannot browse repositories or take actions.

  1. Retrieval (RAG)

    I search a curated corpus of Elizabeth's portfolio and resume using Qdrant. Follow-up retrieval includes recent user questions. Retrieved passages are reference material, not instructions.

  2. Vector database

    Qdrant Cloud computes multilingual-e5-small embeddings with query and passage prefixes. Corpus updates use a staged collection and an atomic alias switch.

  3. Language model

    I use an OpenAI model hosted on Azure through the standard OpenAI SDK. The endpoint, key, and deployment are server-side configuration. I do not use an Azure-specific SDK client.

  4. Tracing and observability

    When configured, Langfuse records retrieval timing, each generation attempt, usage, and final outcomes including failures and refusals. Tracing is not evidence that an answer is correct.

  5. Guardrails

    Input and history are bounded. The system prompt restricts scope and treats reference material as untrusted. Responses must satisfy a JSON contract and cite existing reference IDs. These checks do not prove semantic support or eliminate prompt injection.

  6. Evaluation

    The evaluation checks service success, response structure, required facts, unsupported claims specified in test cases, refusals, references, and follow-up questions. Human review is still needed for factual support beyond those checks.

  7. Reliability

    Requests have a deadline, cancellation, bounded retries, and rate limits. The interface shows progress, then the answer after contract validation. Failures are explicit and can be retried.

Inspect the reference library