Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Have you fine-tuned LLMs to know the contents of a specific code base?
7 points by andreyk on April 25, 2023 | hide | past | favorite | 1 comment
I am interested in trying to make LLMs know the contents of my project, so it can know what classes/functions/variables there are outside the current file/prompt. The first idea for "adding" knowledge of the code base (assuming it is too large to fit into the prompt) would be to fine-tune the LLM on the code. Has anyone tried this or knows of any work on it?



Fine-tuning is probably not the way to do it.

Try embedding, semantic search, retrieval, and plugging the relevant parts into the prompt.

You may need: - summarizer prompt to summarize your project structure, main functions, methods. - vector store/database to store and retrieve your relevant code from code base - coder prompt to write code based on the retrieved part.

Check out langchain: https://langchain.readthedocs.io/




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: