DocArrayHnswSearch는 Docarray에서 제공하는 경량 Document Index 구현으로, 완전히 로컬에서 실행되며 소규모에서 중규모 데이터셋에 가장 적합합니다. 벡터는 hnswlib에 디스크에 저장하고, 다른 모든 데이터는 SQLite에 저장합니다.이 integration을 사용하려면
pip install -qU langchain-community로 langchain-community를 설치해야 합니다
이 notebook은 DocArrayHnswSearch와 관련된 기능을 사용하는 방법을 보여줍니다.
Setup
아직 설치하지 않았다면 아래 셀의 주석을 해제하여 docarray를 설치하고 OpenAI api key를 가져오거나 설정하세요.DocArrayHnswSearch 사용하기
Similarity search
Similarity search with score
반환되는 distance score는 cosine distance입니다. 따라서 낮은 score가 더 좋습니다.Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.