반응형

쿼드란트 Vector DB 구축
1. Qdrant GitHub Releases 페이지에서 맞는 릴리즈 버전 다운로드
2. 원하는 위치에 압축풀기
3. qdrant.exe 로 실행하기
4. 하면 http://localhost:6333/dashboard 들어가면 아무것도 안뜬다.
5. https://github.com/qdrant/qdrant-web-ui/releases 여기서 최신 ui 버전 받고 qudrant가 들어있는 폴더안에 파일을 다옮겨야 그래야 ui버전이 뜬다.
Releases · qdrant/qdrant-web-ui
Self-hosted web UI for Qdrant. Contribute to qdrant/qdrant-web-ui development by creating an account on GitHub.
github.com
실행 화면

python으로 벡터 DB에 데이터 밀어넣기
pip install qdrant-client
from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams
from qdrant_client.models import PointStruct
client = QdrantClient(url="http://localhost:6333")
client.create_collection(
collection_name="test_collection",
vectors_config=VectorParams(size=4, distance=Distance.DOT),
)
operation_info = client.upsert(
collection_name="test_collection",
wait=True,
points=[
PointStruct(id=1, vector=[0.05, 0.61, 0.76, 0.74], payload={"city": "Berlin"}),
PointStruct(id=2, vector=[0.19, 0.81, 0.75, 0.11], payload={"city": "London"}),
PointStruct(id=3, vector=[0.36, 0.55, 0.47, 0.94], payload={"city": "Moscow"}),
PointStruct(id=4, vector=[0.18, 0.01, 0.85, 0.80], payload={"city": "New York"}),
PointStruct(id=5, vector=[0.24, 0.18, 0.22, 0.44], payload={"city": "Beijing"}),
PointStruct(id=6, vector=[0.35, 0.08, 0.11, 0.44], payload={"city": "Mumbai"}),
],
)
print(operation_info)
search_result = client.query_points(
collection_name="test_collection",
query=[0.2, 0.1, 0.9, 0.7],
with_payload=False,
limit=3
).points
print(search_result)
결과


반응형
'AI' 카테고리의 다른 글
| 태태개발일지 - 간단한 langchain streamlit 코드 (0) | 2026.05.05 |
|---|---|
| 태태개발일지 - 머신러닝( 모델 평가) (0) | 2026.04.24 |
| 태태개발일지 - 자연어처리(FFN, RNN 등장) (0) | 2026.04.11 |
| 태태개발일지 - 기계학습(SVM) (0) | 2026.04.11 |
| 태태개발일지 - 기계학습(배깅,랜덤포레스트,부스팅) (0) | 2026.04.11 |