Skip to content

Commit

Permalink
Merge branch 'Feature/#338' into Feature/#335
Browse files Browse the repository at this point in the history
# Conflicts:
#	sample_config/full.yaml
  • Loading branch information
bwook00 committed Apr 22, 2024
2 parents 39a5a82 + 710e2af commit f22eadd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/source/nodes/passage_augmenter/passage_augmenter.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ node_lines:
metrics: [ retrieval_f1, retrieval_recall, retrieval_precision ]
speed_threshold: 5
embedding_model: openai
top_k: 5
modules:
- module_type: pass_passage_augmenter
- module_type: prev_next_augmenter
Expand Down
1 change: 1 addition & 0 deletions sample_config/full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ node_lines:
strategy:
metrics: [ retrieval_f1, retrieval_recall, retrieval_precision ]
speed_threshold: 5
top_k: 5
embedding_model: openai
modules:
- module_type: pass_passage_augmenter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def test_prev_next_augmenter_multi_passages():


def test_prev_next_augmenter_node():
result_df = prev_next_augmenter(project_dir=project_dir, previous_result=previous_result, mode='next', top_k=3)
result_df = prev_next_augmenter(project_dir=project_dir, previous_result=previous_result, mode='next', top_k=2)
contents = result_df["retrieved_contents"].tolist()
ids = result_df["retrieved_ids"].tolist()
scores = result_df["retrieve_scores"].tolist()
assert len(contents) == len(ids) == len(scores) == 2
assert len(contents[0]) == len(ids[0]) == len(scores[0]) == 3
assert len(contents[0]) == len(ids[0]) == len(scores[0]) == 2
for content_list, id_list, score_list in zip(contents, ids, scores):
for i, (content, _id, score) in enumerate(zip(content_list, id_list, score_list)):
assert isinstance(content, str)
Expand Down

0 comments on commit f22eadd

Please sign in to comment.