We need to find a way to add weight to file names. When we have a ticket like Add X to models.py the models.py should always be sent to the LLM.
Currently we match the embeddings, generated from the file contents, with the ticket prompt. This is an issue when we have something like:
- Prompt:
Add updated_at field to User Model on models.py
- models.py contents:
from django.db import models
class User(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4)
email = models.TextField(unique=True)
username = models.CharField("username", max_length=150, null=True)
- And we have 10 files that reference
models.py multiple times
The result will be that the 10 files will be sent because their embeddings are closer to the prompt than the content of models.py. This happens because models.py does not have any reference to models.py and the name of the file is not considered.
We need to find a way to add weight to file names. When we have a ticket like
Add X to models.pythemodels.pyshould always be sent to the LLM.Currently we match the embeddings, generated from the file contents, with the ticket prompt. This is an issue when we have something like:
Add updated_at field to User Model on models.pymodels.pymultiple timesThe result will be that the 10 files will be sent because their embeddings are closer to the prompt than the content of
models.py. This happens becausemodels.pydoes not have any reference tomodels.pyand the name of the file is not considered.