This project is a playground, learning, and showcase project with the intent to learn while building something useful for myself. One day, I realized that my CV was not very up to date and I had to update it. I experimented with n8n to build an interview loop that would update my CV with additional information. I found it to be a bit too complex and not very flexible and started experimenting in this repo. Now (a few month later), that I am writing this I'd do a few things differently, and I might even do so in the future. But I also learned a lot and I want to share some of my learnings with you.
- Start with a larger model, make things work, tune for smaller model
- Saving costs through context caching in system message can be effective
- Split logic whenever possible. Allows for easier testing, failure isolation, parallelization and smaller models
- Use graph RAG to steer the interview
- Add STT/TTS voice control
- AI-Powered Interviews: Uses Spring AI to run an interview loop via an LLM
- Structured Data Collection: Follows a predefined interview plan with topics and threads
- Persistence: Stores career data and interview progress in MongoDB
- Preprocessing: Includes natural language preprocessing to interpret user inputs
- Observability: Spring AI client observations can be enabled/adjusted via config
The application follows a Spring Boot architecture with the following key components:
- InterviewApplication: Main entry point for the Spring Boot application
- InterviewEngine: Orchestrates message handling, preprocessing, planning and persistence updates
- Interviewer: Uses Spring AI
ChatClientto ask/continue questions - InterviewPlanner: Manages topics/threads for the interview flow
- CareerData: Domain model stored in MongoDB
- Spring Boot 3.4.4: Application framework
- Spring AI 1.0.0-M8: AI capabilities integration
- MongoDB: Data persistence
- JUnit 5: Testing framework
- Testcontainers: Integration testing with containerized dependencies
- Lombok: Reduces boilerplate code
- Java 17+
- Maven
- MongoDB (or Docker, if you only want to run tests with Testcontainers)
# Build the project
mvn clean install
# Run the application
mvn spring-boot:runThe application is configured via application.yml:
spring:
ai:
chat:
client:
observations:
include-input: false
data:
mongodb:
host: localhost
port: 27018
database: interview
username: mongouser
password: mongopwTo run LLM-backed parts (OpenAI), set the API key as an environment variable:
export SPRING_AI_OPENAI_API_KEY=your-api-key-hereWithout this environment variable, calls to the OpenAI model will fail.
The project includes both unit and integration tests:
# Run all tests
mvn test
# Run a specific test
mvn test -Dtest=InterviewerTest#methodName- The system follows a structured interview plan with topics and threads
- Each thread represents a specific area of information to collect
- The interviewer asks one question at a time and processes the response
- Responses are stored in MongoDB for later analysis
Contributions are welcome! Please feel free to submit a Pull Request.