---
title: "Yusuf Öztoprak (@yusufoztoprak) | Hashnode"
description: "Backend Engineer | AI Infrastructure (RAG · pgvector · LLM APIs). Read the latest articles by Yusuf Öztoprak on Hashnode."
url: "https://hashnode.com/@yusufoztoprak"
---

@yusufoztoprak

# Yusuf Öztoprak

@yusufoztoprak · Istanbul, Turkey · Joined July 2026

Backend Engineer | AI Infrastructure (RAG · pgvector · LLM APIs)

### [I Paid for the Embedding. My Logs Never Saw the Request.](https://yusufoztoprak.hashnode.dev/i-paid-for-the-embedding-my-logs-never-saw-the-request?utm_source=hashnode&utm_medium=feed)

A follow-up to Counting OpenAI Tokens per Request in FastAPI. I sent a document to evorag while the database was down. OpenAI was called. The embedding was created. I paid for it. Then the database wr

4 min read · [yusufoztoprak.hashnode.dev](https://yusufoztoprak.hashnode.dev/i-paid-for-the-embedding-my-logs-never-saw-the-request?utm_source=hashnode&utm_medium=feed)

[Nov 5](https://hashnode.com/posts/i-paid-for-the-embedding-my-logs-never-saw-the-request/6aec78747b81c2637ee84eaa)

### [Swapping OpenAI for a Fake Embedder With One Environment Variable](https://yusufoztoprak.hashnode.dev/swapping-openai-for-a-fake-embedder-with-one-environment-variable?utm_source=hashnode&utm_medium=feed)

A Factory refactor in a NestJS RAG API, and three things the tutorials leave out

9 min read · [yusufoztoprak.hashnode.dev](https://yusufoztoprak.hashnode.dev/swapping-openai-for-a-fake-embedder-with-one-environment-variable?utm_source=hashnode&utm_medium=feed)

[Oct 27](https://hashnode.com/posts/swapping-openai-for-a-fake-embedder-with-one-environment-variable/6ae0887d18cbd3a0b53c3108)

### [Counting OpenAI Tokens per Request in FastAPI — Without Touching My Use Cases](https://yusufoztoprak.hashnode.dev/counting-openai-tokens-per-request-in-fastapi-without-touching-my-use-cases?utm_source=hashnode&utm_medium=feed)

Structured logging for a Clean Architecture RAG service, and the ContextVar trap I had to design around

7 min read · [yusufoztoprak.hashnode.dev](https://yusufoztoprak.hashnode.dev/counting-openai-tokens-per-request-in-fastapi-without-touching-my-use-cases?utm_source=hashnode&utm_medium=feed)

[Oct 17](https://hashnode.com/posts/counting-openai-tokens-per-request-in-fastapi-without-touching-my-use-cases/6ad373d6a480dabb84c1855b)

### [Building a RAG Service from Scratch with NestJS + pgvector](https://yusufoztoprak.hashnode.dev/building-a-rag-service-from-scratch-with-nestjs-pgvector?utm_source=hashnode&utm_medium=feed)

How I built a Retrieval-Augmented Generation (RAG) service from scratch using NestJS, PostgreSQL, and pgvector — covering chunking, embeddings, and semantic search.

4 min read · [yusufoztoprak.hashnode.dev](https://yusufoztoprak.hashnode.dev/building-a-rag-service-from-scratch-with-nestjs-pgvector?utm_source=hashnode&utm_medium=feed)

[Jul 6](https://hashnode.com/posts/building-a-rag-service-from-scratch-with-nestjs-pgvector/6a4bed534bc0fc7b4e8c5e62)
