Mapping Resumes to Pokemon via Semantic Embeddings
The implementation logic is actually quite sophisticated for a "fun" prototype. Instead of just hitting an API, the developer built a local dataset by scraping PokeAPI for species data, names, and flavor text. They then went a step further by generating "professional archetype profiles" for each Pokemon based on their types and base stats—essentially mapping monster biology to career traits (e.g., a Steel-type becomes a "disciplined, robust engineer").
The technical pipeline is where it gets interesting:
1. Preprocessing: The system uses BAAI/bge-m3 to embed both the Pokemon descriptions and the user's resume sections (skills, projects, etc.). This is all pre-computed and stored in .npy files to avoid runtime API overhead.
2. Two-Stage Retrieval: To solve the precision problem, the system uses a two-step process. It first performs a cosine similarity search to find a shortlist of candidates, then passes those pairs through a cross-encoder (BAAI/bge-reranker-v2-m3). This joint re-scoring is much more accurate than simple vector distance.
3. Statistical Normalization: Because similarity scores in a vector space often cluster tightly, the dev implemented a sigmoid function to standardize the rerank scores. This converts the raw output into a "relative fit" score. It's not an absolute probability, but rather a measure of how much the top match stands out from the rest of the candidate pool.
4. Z-Score Confidence: The final output uses a z-score to flag whether a match is decisive or if the profile is too diffuse.
It’s a solid example of how to build a high-precision semantic search tool on a budget. It proves you don't need a massive cluster if your retrieval-rerank architecture is sound.
The source code is hosted on Hugging Face Spaces at:https://huggingface.co/spaces/rastadidi/resume-to-pokemon