MCPcopy Create free account

hub / github.com/AndrewWTY/UNIT / functions

Functions113 in github.com/AndrewWTY/UNIT

↓ 6 callersMethodclose
Close the connection to the database.
src/factscore_retrieval.py:43
↓ 5 callersFunctionis_info
(d)
src/make_data_ref.py:127
↓ 4 callersFunctionformat_prompt
(tokenizer, system, input, no_system=False)
src/vllm_inference_for_ccp.py:95
↓ 3 callersFunctionbatchify
Split the list `lst` into sublists of size `batch_size`.
src/compute_ccp.py:28
↓ 3 callersMethodget_passages
(self, topic, question, k)
src/wild_retrieval.py:156
↓ 2 callersFunctionask_open_ai
(args, prompts, sub_cache_name, batch_result, system_msg="You are a helpful AI assistant.")
src/extract_sentence_facts.py:35
↓ 2 callersFunctionbatchify
Split the list `lst` into sublists of size `batch_size`.
src/factcheck.py:226
↓ 2 callersFunctioncompute_ranked_error_four_lists
(incorrect_in_reflection, correct_in_reflection, incorrect_in_unreflection, correct_in_unreflection, threshold
src/evaluate_calibration.py:292
↓ 2 callersFunctioncreate_answers_async
(model, messages, cache_path, batch_size=5, seed=42, temperature=0)
src/factcheck.py:344
↓ 2 callersFunctioncreate_answers_async
(model, messages, cache_path, generation_args, batch_size=5)
src/make_data_cut.py:191
↓ 2 callersFunctioncreate_answers_async
Send prompts in parallel batches (with simple on-disk caching).
src/instruction_classification.py:69
↓ 2 callersFunctionextract_sorting_response
(input_text)
src/evaluate_calibration.py:215
↓ 2 callersFunctionfind_quantile
(x, data)
src/evaluate_calibration.py:254
↓ 2 callersMethodget_all_passages
(self, entity)
src/wild_retrieval.py:103
↓ 2 callersFunctionget_input_price
(input_str, model)
src/factcheck.py:63
↓ 2 callersFunctionget_input_price
(model, input_len=None)
src/make_data_cut.py:95
↓ 2 callersFunctionget_output_price
(output_str, model)
src/factcheck.py:70
↓ 2 callersFunctionget_output_price
(model, output_len=None)
src/make_data_cut.py:100
↓ 2 callersFunctionload_jsonl
Loads a JSONL file into a list of dictionaries. Args: file_path: The path to the JSONL file. Returns: A list of dictionaries
src/evaluate_calibration.py:109
↓ 2 callersFunctionranked_error_for_group
(values)
src/evaluate_calibration.py:310
↓ 2 callersFunctionsave_jsonl
(rows, path)
src/make_data_ref.py:63
↓ 2 callersFunctiontoken_price
(txt, model, price_dict)
src/instruction_classification.py:94
↓ 2 callersFunctiontransform_data
(rows, all_info_seeking=False, no_surgery=False)
src/make_data_ref.py:235
↓ 1 callersMethod_async_send_request
(self, client, message)
src/factcheck.py:192
↓ 1 callersMethod_async_send_request
(self, client, message)
src/compute_helpfulness.py:183
↓ 1 callersMethod_format_prompt
(self, system, input_text, no_system=False)
src/inference_pipeline.py:61
↓ 1 callersMethod_initialize_database
(self)
src/wild_retrieval.py:69
↓ 1 callersMethod_send_request
(self, messages)
src/factcheck.py:201
↓ 1 callersMethod_send_request
(self, messages)
src/compute_helpfulness.py:192
↓ 1 callersMethod_send_request
(self, messages)
src/make_data_cut.py:155
↓ 1 callersMethod_tokenize_and_store
(self, data)
src/wild_retrieval.py:83
↓ 1 callersFunctionachat
(client, model, message, seed=42, temperature=0)
src/factcheck.py:334
↓ 1 callersFunctionachat
(model, messages, generation_args)
src/make_data_cut.py:175
↓ 1 callersFunctionachat
(client, model, msg, seed=42, temperature=0)
src/instruction_classification.py:63
↓ 1 callersFunctionadd_certainty_fields
Adds 'info-seeking', 'certain_claims', 'uncertain_claims' columns.
src/make_data_ref.py:169
↓ 1 callersFunctionalign
Identifies token indices in `sent_tokens` that align with matching characters (marked by '^') in `match_str`. All tokens, which textual rep
src/compute_ccp.py:185
↓ 1 callersFunctionalign_facts
Given target output texts, and extracted facts from the output texts. Align the tokens of extracted facts to tokens in output texts.
src/compute_ccp.py:232
↓ 1 callersFunctionapi_call
()
src/factcheck.py:492
↓ 1 callersFunctionappend_exceeding_claims_with_confidence
Attach a 'surgery_response' that includes reflection text.
src/make_data_ref.py:193
↓ 1 callersMethodask
(self, message: str)
src/compute_helpfulness.py:96
↓ 1 callersFunctionask_open_ai
(args, prompts, batch_result, sub_cache_name, system_prompt=SYSTEM_PROMPT_JUDGE, real_time=False)
src/compute_helpfulness.py:222
↓ 1 callersMethodasync_ask
(self, message_list)
src/factcheck.py:138
↓ 1 callersFunctionbatchify
Split the list `lst` into sublists of size `batch_size`.
src/make_data_cut.py:186
↓ 1 callersFunctionbatchify
(lst, n)
src/instruction_classification.py:59
↓ 1 callersFunctionbatchify_claims
(extraction_results, output_texts, batch_size)
src/compute_ccp.py:33
↓ 1 callersMethodbuild_db
(self, db_path, data_path)
src/factscore_retrieval.py:47
↓ 1 callersFunctioncapitalize_first_letter
(input_string)
src/vllm_inference_for_ccp.py:109
↓ 1 callersFunctionextract_and_plot_ccp
(data)
src/make_data_ref.py:81
↓ 1 callersFunctionextract_claims_ccp
(claim_uncertainty_text)
src/evaluate_calibration.py:238
↓ 1 callersFunctionextract_facts
(args, output_texts)
src/extract_sentence_facts.py:199
↓ 1 callersFunctionextract_reflections
Extracts reflections from the response text after the <reflection> token. Strips numbering from each reflection.
src/evaluate_calibration.py:189
↓ 1 callersFunctionfilter_lora
(lora_path)
src/inference_pipeline.py:15
↓ 1 callersMethodgenerate_responses
Generates responses based on provided sampling parameters.
src/inference_pipeline.py:51
↓ 1 callersFunctionget_args
()
src/vllm_inference_for_ccp.py:117
↓ 1 callersMethodget_bm25_passages
(self, topic, query, passages, k)
src/factscore_retrieval.py:171
↓ 1 callersMethodget_bm25_passages
(self, entity, query_sentence, top_k=5)
src/wild_retrieval.py:112
↓ 1 callersMethodget_gtr_passages
(self, topic, retrieval_query, passages, k)
src/factscore_retrieval.py:182
↓ 1 callersMethodget_gtr_passages
(self, entity, query_sentence, top_k=5)
src/wild_retrieval.py:130
↓ 1 callersFunctionget_input_price
(input_str, model)
src/compute_helpfulness.py:54
↓ 1 callersFunctionget_output_price
(output_str, model)
src/compute_helpfulness.py:61
↓ 1 callersMethodget_passages
(self, topic, question, k)
src/factscore_retrieval.py:199
↓ 1 callersFunctionget_ranks
(values, sorted_list)
src/evaluate_calibration.py:307
↓ 1 callersMethodget_text_from_title
Fetch the raw text of the doc for 'doc_id'.
src/factscore_retrieval.py:100
↓ 1 callersFunctionis_info
(d)
src/make_data_cut.py:260
↓ 1 callersFunctionlabel_quantiles
Add booleans (ccp_above_qXX / max_prob_above_qXX) to each uncertainty block. Returns (new_data, ccp_q75).
src/make_data_ref.py:124
↓ 1 callersFunctionload_datasets
(file_paths, question_columns)
src/inference_pipeline.py:74
↓ 1 callersMethodload_encoder
(self)
src/factscore_retrieval.py:132
↓ 1 callersMethodload_encoder
(self)
src/wild_retrieval.py:96
↓ 1 callersFunctionload_jsonl
(path)
src/make_data_ref.py:52
↓ 1 callersFunctionmain
()
src/factcheck.py:391
↓ 1 callersFunctionmain
(file, setting)
src/compute_truthfulness.py:5
↓ 1 callersFunctionmain
()
src/compute_helpfulness.py:324
↓ 1 callersFunctionmain
()
src/evaluate_calibration.py:320
↓ 1 callersFunctionmain
()
src/make_data_cut.py:244
↓ 1 callersFunctionmain
()
src/get_atomic_claims.py:27
↓ 1 callersFunctionmain
(file, setting)
src/compute_honesty_upper_bound.py:6
↓ 1 callersFunctionmain
(config)
src/inference_pipeline.py:130
↓ 1 callersFunctionmain
(args)
src/vllm_inference_for_ccp.py:134
↓ 1 callersFunctionmain
()
src/make_data_ref.py:295
↓ 1 callersFunctionmatch_string
Greedily matching words from `match_words` to `sent`. Parameters: sent (str): sentence string match_words (List[str]): li
src/extract_sentence_facts.py:138
↓ 1 callersFunctionmerge_configs
(config, args, parser)
src/inference_pipeline.py:122
↓ 1 callersFunctionparse_args
()
src/make_data_ref.py:15
↓ 1 callersFunctionprint_claims
(claims, number=True)
src/make_data_cut.py:105
↓ 1 callersFunctionremove_entries_with_none_response
(data)
src/make_data_ref.py:71
Method__call__
(self, system_prompt, user_prompt, max_tokens = 300, temperature = 0.7, response_format = { "type": "text" })
src/evaluate_calibration.py:27
Method__call__
Calculates the statistics of probabilities at each token position in the output text. Parameters: input_texts (List[
src/compute_ccp.py:75
Method__call__
Calculates the statistics of probabilities at each token position in the output text. Parameters: input_texts (List[
src/vllm_inference_for_ccp.py:38
Method__enter__
(self)
src/factscore_retrieval.py:33
Method__exit__
(self, *args)
src/factscore_retrieval.py:36
Method__init__
Parameters ---------- openai_model: str the model to use in OpenAI to chat.
src/factcheck.py:82
Method__init__
Parameters ---------- openai_model: str the model to use in OpenAI to chat.
src/compute_helpfulness.py:73
Method__init__
(self, model)
src/evaluate_calibration.py:23
Method__init__
( self, model_name: str = None, cache_path: str = "litellm_cache",
src/make_data_cut.py:117
Method__init__
(self, n_alternatives: int = 10)
src/compute_ccp.py:72
Method__init__
(self, db_path=None, data_path=None)
src/factscore_retrieval.py:21
Method__init__
(self, db, cache_path, embed_cache_path, retrieval_type="gtr-t5-large", batch_size=None)
src/factscore_retrieval.py:116
Method__init__
(self, model_type, llm, tokenizer)
src/inference_pipeline.py:45
Method__init__
(self, n_alternatives: int = 10)
src/vllm_inference_for_ccp.py:35
Method__init__
(self, cache_path, batch_size, embed_cache_path, db_path='factcheck_cache/wildhallu.db', retrieval_type="gtr-t
src/wild_retrieval.py:15
Methodask
(self, message: str)
src/factcheck.py:105
next →1–100 of 113, ranked by callers