예제
DeepEval — 구현 샘플

실제로 실행 가능한 미니 프로젝트입니다. 받아서 Docker로 실행해 보세요.

2026년 6월 28일

DeepEval — 구현 샘플

아주 작은 DeepEval 샘플입니다. Answer Relevancy 지표(LLM 채점)로 답을 채점합니다.

설정

cd samples/deepeval_1
cp .env.sample .env
# .env 편집: OPENAI_API_KEY 설정(채점 모델로 사용)

Docker로 실행

cd samples/deepeval_1
docker build -t aas-deepeval .
docker run --rm --env-file .env aas-deepeval

Docker로 실행 (DooD를 쓰는 devcontainer에서)

Docker-outside-of-Docker에서는 포그라운드 docker run이 아무것도 출력하지 않을 수 있습니다 — detached로 실행하고 로그를 따라가세요:

docker logs -f "$(docker run -d --env-file .env aas-deepeval)"

로컬에서 실행

cd samples/deepeval_1
pip install -r requirements.txt
python app.py

실행 결과

점수는 LLM 채점을 쓰므로 점수와 사유가 실행마다 조금씩 달라집니다. gpt-4o-mini로 실행한 한 예입니다:

answer_relevancy: 1.00
reason: The score is 1.00 because the response directly addresses the question about the programming language of Qdrant without any irrelevant statements.

파일

.env.sample
# Copy to `.env` and add your OpenAI API key (used as the judge model).
#   cp .env.sample .env
OPENAI_API_KEY=

MODEL=gpt-4o-mini