MCPcopy Create free account

hub / github.com/EternityJune25/ComoRAG / functions

Functions257 in github.com/EternityJune25/ComoRAG

↓ 1 callersMethodget_cluster_members
Get all members of the specified cluster and their membership scores Args: cluster_id: Cluster ID th
src/comorag/utils/cluster_utils.py:378
↓ 1 callersMethodget_cluster_stats
Get clustering statistics
src/comorag/utils/cluster_utils.py:470
↓ 1 callersMethodget_cluster_texts
Get member texts and their membership scores for the specified cluster Args: cluster_id: Cluster ID
src/comorag/utils/cluster_utils.py:441
↓ 1 callersMethodget_embedding
(self, hash_id, dtype=np.float32)
src/comorag/embedding_store.py:147
↓ 1 callersMethodget_fact_scores
(self, query: str)
src/comorag/ComoRAG.py:937
↓ 1 callersMethodget_graph_info
(self)
src/comorag/ComoRAG.py:843
↓ 1 callersMethodget_missing_string_hash_ids
(self, texts: List[str])
src/comorag/embedding_store.py:44
↓ 1 callersMethodget_query_embeddings
(self, queries: List[str] | List[QuerySolution])
src/comorag/ComoRAG.py:909
↓ 1 callersMethodget_related_chunks
Get chunks related to the specified chunk (through shared clusters) Args: hash_id: Target chunk's hash_id
src/comorag/utils/cluster_utils.py:399
↓ 1 callersFunctionget_similar_summaries
Get summaries most similar to the query Args: query: Query text level_store: EmbeddingStore instance storing summaries f
src/comorag/utils/embed_utils.py:109
↓ 1 callersMethodget_summary_statistics
Get summary statistics Returns: Dict[str, Any]: Dictionary containing statistics
src/comorag/utils/timeline_utils.py:73
↓ 1 callersMethodget_top_k_weights
(self, link_top_k: int, all_phrase_weights: np.ndarray,
src/comorag/ComoRAG.py:972
↓ 1 callersMethodgraph_search_with_fact_entities
(self, query: str, link_top_k: int,
src/comorag/ComoRAG.py:992
↓ 1 callersMethodinitialize_graph
(self)
src/comorag/ComoRAG.py:161
↓ 1 callersMethodllm_call
(self, question, fact_before_filter)
src/comorag/rerank.py:79
↓ 1 callersMethodload_and_validate_summaries
Try to load and validate summary statistics
src/comorag/utils/timeline_utils.py:392
↓ 1 callersFunctionload_jsonl
(file_path)
script/chunk_doc_corpus.py:13
↓ 1 callersFunctionlower
(text)
script/eval_qa.py:30
↓ 1 callersFunctionmain
()
main_openai.py:46
↓ 1 callersFunctionmain
()
main_vllm.py:48
↓ 1 callersFunctionmain
()
script/eval_qa.py:239
↓ 1 callersFunctionmake_cache_embed
(encode_func, cache_file_name, device)
src/comorag/embedding_model/base.py:112
↓ 1 callersMethodmake_template
(self, dspy_file_path)
src/comorag/rerank.py:32
↓ 1 callersFunctionmean_pooling
Perform mean pooling on token embeddings using attention mask Args: token_embeddings: Embeddings from the model mask: At
src/comorag/embedding_model/BGEEmbedding.py:15
↓ 1 callersMethodmemory_fusion
(self, query, content)
src/comorag/utils/agents.py:84
↓ 1 callersFunctionmerge_elements_with_same_first_line
(elements, prefix='Wikipedia Title: ')
src/comorag/utils/qa_utils.py:12
↓ 1 callersMethodmerge_temp_to_main
Merge nodes from temporary memory pool to main memory pool
src/comorag/utils/memory_utils.py:97
↓ 1 callersFunctionmin_max_normalize
Normalize scores to [0,1] range
src/comorag/utils/embed_utils.py:99
↓ 1 callersMethodner
(self, chunk_key: str, passage: str)
src/comorag/information_extraction/openie_openai.py:72
↓ 1 callersMethodparse_filter
(self, response)
src/comorag/rerank.py:48
↓ 1 callersMethodperform_clustering
Perform two-level soft clustering (global + local) Args: hash_ids: Chunk hash_ids to cluster, if None then use a
src/comorag/utils/cluster_utils.py:213
↓ 1 callersMethodpre_openie
(self, docs: List[str])
src/comorag/ComoRAG.py:180
↓ 1 callersMethodprepare_retrieval_objects
(self)
src/comorag/ComoRAG.py:876
↓ 1 callersMethodprocess
(self, query: str, context: str = None, previous_probes: str = None, max_completion_tokens: int = 500)
src/comorag/utils/agents.py:137
↓ 1 callersFunctionprocess_dataset
(dataset_path, config)
main_openai.py:8
↓ 1 callersFunctionprocess_dataset
(dataset_path, config)
main_vllm.py:10
↓ 1 callersFunctionreformat_openie_results
(corpus_openie_results)
src/comorag/utils/misc_utils.py:98
↓ 1 callersFunctionremove_articles
(text)
script/eval_qa.py:20
↓ 1 callersFunctionremove_punc
(text)
script/eval_qa.py:26
↓ 1 callersMethodrerank
(self, query: str, candidate_items: List[Tuple], candidate_indice
src/comorag/rerank.py:100
↓ 1 callersMethodrerank_facts
Args: Returns: top_k_fact_indicies: top_k_facts: rerank_log (dict): {'facts_before_rerank': can
src/comorag/ComoRAG.py:1057
↓ 1 callersFunctionretrieve_knn
Retrieve the top-k nearest neighbors for each query id from the key ids. Args: query_ids: List of query identifiers key_
src/comorag/utils/embed_utils.py:8
↓ 1 callersMethodretrieve_similar_nodes
Retrieve similar historical nodes based on current probe Args: current_probe: Current round's probe top_perce
src/comorag/utils/memory_utils.py:188
↓ 1 callersMethodrun_ppr
(self, reset_prob: np.ndarray, damping: float =0.5)
src/comorag/ComoRAG.py:1086
↓ 1 callersFunctionsave_detailed_results
(results_path: str, pooled_results: Dict, example_results: List[Dict], original_data: List[Dict], extracted_an
script/eval_qa.py:209
↓ 1 callersMethodsave_igraph
(self)
src/comorag/ComoRAG.py:836
↓ 1 callersFunctionsave_jsonl
(documents, file_path)
script/chunk_doc_corpus.py:21
↓ 1 callersMethodsave_summary_statistics
Save summary statistics to file Args: output_dir: Output directory
src/comorag/utils/timeline_utils.py:122
↓ 1 callersFunctiontext_processing
(text)
src/comorag/utils/misc_utils.py:91
↓ 1 callersMethodtriple_extraction
(self, chunk_key: str, passage: str, named_entities: List[str])
src/comorag/information_extraction/openie_openai.py:116
↓ 1 callersMethodtry_load_or_generate_summaries
Try to load existing summaries, if they don't exist or are invalid then generate new ones Args: output_dir: Outp
src/comorag/utils/timeline_utils.py:464
↓ 1 callersFunctionwhite_space_fix
(text)
script/eval_qa.py:23
Method__call__
(self, *args, **kwargs)
src/comorag/rerank.py:97
Method__contains__
Allow usage of 'in' to check for keys.
src/comorag/llm/base.py:75
Method__contains__
Allow usage of 'in' to check for keys.
src/comorag/embedding_model/base.py:71
Method__delattr__
(self, key: str)
src/comorag/llm/base.py:49
Method__delattr__
(self, key: str)
src/comorag/embedding_model/base.py:45
Method__delitem__
Allow dict-style key deletion.
src/comorag/llm/base.py:67
Method__delitem__
Allow dict-style key deletion.
src/comorag/embedding_model/base.py:63
Method__getattr__
(self, key: str)
src/comorag/llm/base.py:30
Method__getattr__
(self, key: str)
src/comorag/embedding_model/base.py:26
Method__getitem__
Allow dict-style key lookup.
src/comorag/llm/base.py:56
Method__getitem__
Allow dict-style key lookup.
src/comorag/embedding_model/base.py:52
Method__init__
(self)
script/eval_qa.py:38
Method__init__
(self)
script/eval_qa.py:73
Method__init__
(self, global_config=None, save_dir=None, llm_model_name=None,
src/comorag/ComoRAG.py:44
Method__init__
Initializes the class with necessary configurations and sets up the working directory. Parameters: embedding_model: The mode
src/comorag/embedding_store.py:14
Method__init__
Initialize the reranker with the given configuration. Args: narrtiverag : An object that provides the global configurati
src/comorag/rerank.py:16
Method__init__
(self, model="gpt-4o-mini", llm_base_url="https://api.example.com/v1",llm_api_key=None)
src/comorag/utils/agents.py:56
Method__init__
(self, model="gpt-4o-mini", llm_base_url="https://api.example.com/v1",llm_api_key=None)
src/comorag/utils/agents.py:134
Method__init__
Initialize timeline summarizer Args: chunk_embedding_store: Vector database storing text chunks summ
src/comorag/utils/timeline_utils.py:15
Method__init__
(self, embedding_model=None, agent=None)
src/comorag/utils/memory_utils.py:79
Method__init__
(self, cluster_id: int, centroid: np.ndarray = None)
src/comorag/utils/cluster_utils.py:22
Method__init__
Initialize soft clustering Args: embedding_store: EmbeddingStore instance for getting and storing embeddings
src/comorag/utils/cluster_utils.py:48
Method__init__
Initialize class with support for custom model and API base URL. :param model: Model name :param llm_base_url: Base
src/comorag/utils/summarization_utils.py:18
Method__init__
(self, global_config, cache_dir=None, cache_filename=None, max_model_len=4096, **kwargs)
src/comorag/llm/vllm_offline.py:32
Method__init__
(self, global_config: Optional[BaseConfig] = None)
src/comorag/llm/base.py:120
Method__init__
(self, cache_dir, global_config, cache_filename: str = None, high_throughput: bool = True,
src/comorag/llm/openai_gpt.py:122
Method__init__
(self, global_config: Optional[BaseConfig] = None)
src/comorag/embedding_model/base.py:196
Method__init__
(self, global_config: Optional[BaseConfig] = None, embedding_model_name: Optional[str] = None)
src/comorag/embedding_model/BGEEmbedding.py:37
Method__init__
(self, global_config: Optional[BaseConfig] = None, embedding_model_name: Optional[str] = None)
src/comorag/embedding_model/OpenAI.py:19
Method__init__
(self, llm_model: CacheOpenAI)
src/comorag/information_extraction/openie_openai.py:67
Method__init__
(self, global_config)
src/comorag/information_extraction/openie_vllm_offline.py:15
Method__len__
(self)
src/comorag/utils/cluster_utils.py:37
Method__post_init__
(self)
src/comorag/utils/config_utils.py:294
Method__post_init__
Calculate hash values during initialization
src/comorag/utils/memory_utils.py:32
Method__post_init__
Initialize the templates directory and load templates.
src/comorag/prompts/prompt_template_manager.py:28
Method__repr__
(self)
src/comorag/utils/cluster_utils.py:40
Method__setattr__
(self, key: str, value: Any)
src/comorag/llm/base.py:43
Method__setattr__
(self, key: str, value: Any)
src/comorag/embedding_model/base.py:39
Method__setitem__
Allow dict-style key assignment.
src/comorag/llm/base.py:63
Method__setitem__
Allow dict-style key assignment.
src/comorag/embedding_model/base.py:59
Method__str__
Provide a user-friendly string representation of the configuration.
src/comorag/llm/base.py:106
Method__str__
Provide a user-friendly string representation of the configuration.
src/comorag/embedding_model/base.py:102
Method_encode
Internal encode method that interfaces directly with the model. Args: prompts: List of text prompts to encode
src/comorag/embedding_model/BGEEmbedding.py:92
Method_extract_triples_from_response
(real_response)
src/comorag/information_extraction/openie_openai.py:117
Method_generate_final_summary
Generate final summary Args: texts: List of texts to be summarized Returns: str
src/comorag/utils/timeline_utils.py:260
Method_init_llm_config
(self)
src/comorag/llm/vllm_offline.py:29
Method_init_llm_config
Each LLM model should extract its own running parameters from global_config and raise exception if any mandatory parameter is not defined in
src/comorag/llm/base.py:132
Method_process_window
Process text within a single window Args: window_texts: List of texts within the window window_index
src/comorag/utils/timeline_utils.py:243
← previousnext →101–200 of 257, ranked by callers