Repository navigation
FEAT: 의미 검색 (선택) - #74
Merged
Merged
Conversation
코드를 40줄 조각으로 나눠 OpenAI 호환 /embeddings로 임베딩하고, 질문과 뜻이 가까운 파일 순위를 키워드·그래프 순위와 RRF로 합침. 의미 점수는 파일마다 가장 앞선 후보 하나에만 더하고, 키워드 후보가 없는 파일은 의미 순위 상위 10개에서 가장 가까운 조각에 걸친 심볼 하나씩만 새로 넣음. 벡터는 (모델, 조각 내용 해시)로 인덱스에 남겨 다시 인덱싱하거나 커밋을 바꿔도 바뀐 조각만 새로 만듦. 임베딩 서버로 보내는 조각은 비밀 값을 가림. CLI는 LANTERN_EMBED_* 환경변수로 켬. 공개 벤치마크(embeddinggemma-300m): 적중률 88%→93%, 앞 3개 65%→73%, 한국어 76%→86%, 43%→52%. 질문당 파일은 약 15개→20개.
config.toml에 [embeddings]가 있으면 에이전트·외부 에이전트·Ctrl+K·get_context·맥락 미리보기에 의미 검색을 곁들임. 질문 벡터와 조각 임베딩은 인덱스 잠금 밖에서 해서 느린 로컬 서버라도 다른 작업을 막지 않음. 프로젝트를 여는 동안 빠진 벡터를 16개씩 뒤에서 만들고, 상태 표시줄에 진행률·오류를 보임. 서버에 닿지 않으면 키워드·그래프만으로 조립함. Closes #67
가짜 임베딩 서버로 프로젝트를 열면 조각을 임베딩하고, 키워드가 하나도 안 맞는 질문에도 '뜻이 가까움' 후보가 맥락에 붙는지, 다 만든 뒤 진행률이 사라지는지 확인함.
README에 의미 검색 측정값과 설정 예를, eval에 LANTERN_EMBED_*로 재는 법과 결과(결과-의미검색.md)를 남김.
CI의 새 clippy가 고정 크기 chunks_exact를 경고로 막아서 인덱스로 4바이트씩 읽도록 바꿈.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇
키워드가 겹치지 않는 질문(특히 한국어)도 뜻이 가까운 코드를 찾도록 임베딩 기반 의미 검색을 맥락 엔진에 넣음. 기본은 꺼짐이고
config.toml에[embeddings]를 적으면 켜짐./embeddings) → 질문과 뜻이 가까운 파일 순위를 기존 순위와 RRF로 합침get_context·맥락 미리보기에 적용. 임베딩은 인덱스 잠금 밖에서, 빠진 벡터는 뒤에서 16개씩. 상태 표시줄에 진행률·오류. 서버에 닿지 않으면 기존 방식LANTERN_EMBED_URL·LANTERN_EMBED_MODEL(+_KEY,_QUERY,_DOC)측정 (공개 벤치마크 60커밋, 예산 8000,
embeddinggemma-300m로컬)여섯 묶음(3개 저장소 × 영어·한국어) 모두 적중률과 앞 3개가 같거나 오름. 결과:
eval/bench/결과-의미검색.md한계
확인
Closes #67