Spaces:
Sleeping
Sleeping
検索機能とQA機能他には?
#2
by
terapyon
- opened
どんな機能を提供するか?
- 検索機能
- QA機能
- 他にはあるかな?
検索機能
ベーシックなサンプル
https://python.langchain.com/docs/modules/model_io/prompts/example_selectors/similarity
SemanticSimilarityExampleSelector.from_examples(
FewShotPromptTemplate(
QDrantのみで実行
https://qdrant.tech/documentation/concepts/search/
LangChainを使う
https://python.langchain.com/docs/integrations/vectorstores/qdrant
qdrant = Qdrant.from_documents(
found_docs = qdrant.similarity_search(query)
print(found_docs[0].page_content)
found_docs = qdrant.similarity_search_with_score(query)
QA機能
基本的な使い方
https://python.langchain.com/docs/use_cases/question_answering/
LangChain + Qdrant
https://python.langchain.com/docs/integrations/vectorstores/qdrant#qdrant-as-a-retriever
retriever = qdrant.as_retriever()
検索は、以下を使う
similarity_search_with_score(
フィルターの情報
検索結果として以下が取得できる
{'created_at': 1624949000, 'id': 261, 'labels': ['confirmed'], 'repo_name': 'cocoa', 'title': 'ライセンス通知の有無を検証するツールを実装', 'type_': 'issue', 'url': 'https://github.com/cocoa-mhlw/cocoa/pull/261', 'user': 'Takym'}
{'created_at': 1624677173, 'id': 255, 'labels': ['confirmed'], 'repo_name': 'cocoa', 'title': 'ライセンス通知の自動付与ツールを作成する', 'type_': 'issue', 'url': 'https://github.com/cocoa-mhlw/cocoa/issues/255', 'user': 'Takym'}
{'created_at': 1662582891, 'id': 1239843336, 'labels': ['help wanted', 'question', 'waiting-for-confirmation'], 'repo_name': 'cocoa', 'title': '通知が表示されないケースを調査する', 'type_': 'comment', 'url': 'https://github.com/cocoa-mhlw/cocoa/issues/1104#issuecomment-1239843336', 'user': 'b-wind'}
検索のみを作ることにしてこのタスクは終了とする。
terapyon
changed discussion status to
closed