Skip to content

Commit

Permalink
change llama-index settings
Browse files Browse the repository at this point in the history
  • Loading branch information
etwk committed Aug 3, 2024
1 parent f43a9b3 commit d9347cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ Contexts
### Calculate
- [ ] Shall we calculate percentage of true and false in the input? Any better calculation than items count?

### Doc
- [ ] Show current tech stack.

## Issues
- [ ] Uses many different types of models, diffcult for performance optimization and maintenance.

Expand Down
4 changes: 2 additions & 2 deletions src/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ def get_contexts(statement, keywords, text):
index = build_automerging_index(
[document],
llm=None,
chunk_sizes=[3072, 768, 192],
chunk_sizes=[2048, 512],
) # todo: will it better to use retriever directly?

query_engine = get_automerging_query_engine(index, similarity_top_k=12)
query_engine = get_automerging_query_engine(index, similarity_top_k=16)
query = f"{keywords} | {statement}" # todo: better way
auto_merging_response = query_engine.query(query)
contexts = nodes2list(auto_merging_response.source_nodes)
Expand Down

0 comments on commit d9347cd

Please sign in to comment.