lintsinghua / lintsinghua/DeepAudit

嵌入模型的维度全部使用的是预设的值影响实际运行效果

Open
#90 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7k
Forks
850
PR merge metrics
No merged PRs in 30d

Description

Image

在选择OpenAI兼容后端时,测试维度为4096,但是保存后为768

https://github.com/lintsinghua/DeepAudit/blob/09444458b12653f484db1cf4b883af930809afdd/backend/app/services/rag/embeddings.py#L48-L70

在代码里看到都是根据提供商预设模型和维度,应该是使用测试结果获取维度长度

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with backend/app/services/rag/embeddings.py at lines 48–70 and trace how the OpenAI-compatible backend’s tested embedding dimension is handled when the model is saved. Reproduce the case where testing reports 4096 but persistence uses 768; done means the saved dimension matches the test result rather than a provider preset.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.