add search recipes (#210)
This commit is contained in:
parent
c266f55b88
commit
857a8f61cf
1 changed files with 35 additions and 0 deletions
|
|
@ -118,6 +118,19 @@ EDGE_HYBRID_SEARCH_EPISODE_MENTIONS = SearchConfig(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# performs a hybrid search over edges with cross encoder reranking
|
||||||
|
EDGE_HYBRID_SEARCH_CROSS_ENCODER = SearchConfig(
|
||||||
|
edge_config=EdgeSearchConfig(
|
||||||
|
search_methods=[
|
||||||
|
EdgeSearchMethod.bm25,
|
||||||
|
EdgeSearchMethod.cosine_similarity,
|
||||||
|
EdgeSearchMethod.bfs,
|
||||||
|
],
|
||||||
|
reranker=EdgeReranker.cross_encoder,
|
||||||
|
),
|
||||||
|
limit=10,
|
||||||
|
)
|
||||||
|
|
||||||
# performs a hybrid search over nodes with rrf reranking
|
# performs a hybrid search over nodes with rrf reranking
|
||||||
NODE_HYBRID_SEARCH_RRF = SearchConfig(
|
NODE_HYBRID_SEARCH_RRF = SearchConfig(
|
||||||
node_config=NodeSearchConfig(
|
node_config=NodeSearchConfig(
|
||||||
|
|
@ -150,6 +163,19 @@ NODE_HYBRID_SEARCH_EPISODE_MENTIONS = SearchConfig(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# performs a hybrid search over nodes with episode mentions reranking
|
||||||
|
NODE_HYBRID_SEARCH_CROSS_ENCODER = SearchConfig(
|
||||||
|
node_config=NodeSearchConfig(
|
||||||
|
search_methods=[
|
||||||
|
NodeSearchMethod.bm25,
|
||||||
|
NodeSearchMethod.cosine_similarity,
|
||||||
|
NodeSearchMethod.bfs,
|
||||||
|
],
|
||||||
|
reranker=NodeReranker.cross_encoder,
|
||||||
|
),
|
||||||
|
limit=10,
|
||||||
|
)
|
||||||
|
|
||||||
# performs a hybrid search over communities with rrf reranking
|
# performs a hybrid search over communities with rrf reranking
|
||||||
COMMUNITY_HYBRID_SEARCH_RRF = SearchConfig(
|
COMMUNITY_HYBRID_SEARCH_RRF = SearchConfig(
|
||||||
community_config=CommunitySearchConfig(
|
community_config=CommunitySearchConfig(
|
||||||
|
|
@ -165,3 +191,12 @@ COMMUNITY_HYBRID_SEARCH_MMR = SearchConfig(
|
||||||
reranker=CommunityReranker.mmr,
|
reranker=CommunityReranker.mmr,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# performs a hybrid search over communities with mmr reranking
|
||||||
|
COMMUNITY_HYBRID_SEARCH_CROSS_ENCODER = SearchConfig(
|
||||||
|
community_config=CommunitySearchConfig(
|
||||||
|
search_methods=[CommunitySearchMethod.bm25, CommunitySearchMethod.cosine_similarity],
|
||||||
|
reranker=CommunityReranker.cross_encoder,
|
||||||
|
),
|
||||||
|
limit=3,
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue