SYMBOL INDEX (253 symbols across 15 files) FILE: local_evaluation.py function load_json_file (line 23) | def load_json_file(file_path): function get_system_message (line 30) | def get_system_message(): function attempt_api_call (line 35) | def attempt_api_call(client, model_name, messages, max_retries=10): function log_response (line 55) | def log_response(messages, response, output_directory="api_responses"): function parse_response (line 64) | def parse_response(response: str): function trim_predictions_to_max_token_length (line 109) | def trim_predictions_to_max_token_length(prediction): function load_data_in_batches (line 118) | def load_data_in_batches(dataset_path, batch_size): function generate_predictions (line 160) | def generate_predictions(dataset_path, participant_model): function evaluate_predictions (line 185) | def evaluate_predictions(queries, ground_truths_list, predictions, evalu... FILE: mock_api/apiwrapper/pycragapi.py class CRAG (line 14) | class CRAG(object): method __init__ (line 75) | def __init__(self): method open_search_entity_by_name (line 78) | def open_search_entity_by_name(self, query:str): method open_get_entity (line 85) | def open_get_entity(self, entity:str): method movie_get_person_info (line 92) | def movie_get_person_info(self, person_name:str): method movie_get_movie_info (line 99) | def movie_get_movie_info(self, movie_name:str): method movie_get_year_info (line 106) | def movie_get_year_info(self, year:str): method movie_get_movie_info_by_id (line 113) | def movie_get_movie_info_by_id(self, movid_id:int): method movie_get_person_info_by_id (line 120) | def movie_get_person_info_by_id(self, person_id:int): method finance_get_company_name (line 127) | def finance_get_company_name(self, query:str): method finance_get_ticker_by_name (line 134) | def finance_get_ticker_by_name(self, query:str): method finance_get_price_history (line 141) | def finance_get_price_history(self, ticker_name:str): method finance_get_detailed_price_history (line 148) | def finance_get_detailed_price_history(self, ticker_name:str): method finance_get_dividends_history (line 155) | def finance_get_dividends_history(self, ticker_name:str): method finance_get_market_capitalization (line 162) | def finance_get_market_capitalization(self, ticker_name:str): method finance_get_eps (line 169) | def finance_get_eps(self, ticker_name:str): method finance_get_pe_ratio (line 176) | def finance_get_pe_ratio(self, ticker_name:str): method finance_get_info (line 183) | def finance_get_info(self, ticker_name:str): method music_search_artist_entity_by_name (line 190) | def music_search_artist_entity_by_name(self, artist_name:str): method music_search_song_entity_by_name (line 197) | def music_search_song_entity_by_name(self, song_name:str): method music_get_billboard_rank_date (line 204) | def music_get_billboard_rank_date(self, rank:int, date:str=None): method music_get_billboard_attributes (line 211) | def music_get_billboard_attributes(self, date:str, attribute:str, song... method music_grammy_get_best_artist_by_year (line 218) | def music_grammy_get_best_artist_by_year(self, year:int): method music_grammy_get_award_count_by_artist (line 225) | def music_grammy_get_award_count_by_artist(self, artist_name:str): method music_grammy_get_award_count_by_song (line 232) | def music_grammy_get_award_count_by_song(self, song_name:str): method music_grammy_get_best_song_by_year (line 239) | def music_grammy_get_best_song_by_year(self, year:int): method music_grammy_get_award_date_by_artist (line 246) | def music_grammy_get_award_date_by_artist(self, artist_name:str): method music_grammy_get_best_album_by_year (line 253) | def music_grammy_get_best_album_by_year(self, year:int): method music_grammy_get_all_awarded_artists (line 260) | def music_grammy_get_all_awarded_artists(self): method music_get_artist_birth_place (line 266) | def music_get_artist_birth_place(self, artist_name:str): method music_get_artist_birth_date (line 273) | def music_get_artist_birth_date(self, artist_name:str): method music_get_members (line 280) | def music_get_members(self, band_name:str): method music_get_lifespan (line 287) | def music_get_lifespan(self, artist_name:str): method music_get_song_author (line 294) | def music_get_song_author(self, song_name:str): method music_get_song_release_country (line 301) | def music_get_song_release_country(self, song_name:str): method music_get_song_release_date (line 308) | def music_get_song_release_date(self, song_name:str): method music_get_artist_all_works (line 315) | def music_get_artist_all_works(self, song_name:str): method sports_soccer_get_games_on_date (line 322) | def sports_soccer_get_games_on_date(self, date:str, team_name:str=None): method sports_nba_get_games_on_date (line 329) | def sports_nba_get_games_on_date(self, date:str, team_name:str=None): method sports_nba_get_play_by_play_data_by_game_ids (line 336) | def sports_nba_get_play_by_play_data_by_game_ids(self, game_ids:List[s... FILE: mock_api/cragapi/fast_bm25.py class BM25 (line 35) | class BM25: method __init__ (line 49) | def __init__(self, corpus, k1=PARAM_K1, b=PARAM_B, alpha=IDF_CUTOFF): method corpus_size (line 81) | def corpus_size(self): method _initialize (line 84) | def _initialize(self, corpus): method get_top_n (line 119) | def get_top_n(self, query, documents, n=5): method save (line 147) | def save(self, filename): method load (line 152) | def load(filename): FILE: mock_api/cragapi/finance.py class FinanceKG (line 23) | class FinanceKG(): method __init__ (line 24) | def __init__(self): method _load_db (line 43) | def _load_db(self): method normalize (line 70) | def normalize(self, x:str) -> str: method get_company_name (line 80) | def get_company_name(self, query:str) -> list[str]: method get_ticker_by_name (line 99) | def get_ticker_by_name(self, company_name:str) -> str: method get_price_history (line 109) | def get_price_history(self, ticker_name:str): method get_detailed_price_history (line 134) | def get_detailed_price_history(self, ticker_name:str): method get_dividends_history (line 159) | def get_dividends_history(self, ticker_name:str): method get_market_capitalization (line 177) | def get_market_capitalization(self, ticker_name: str) -> float: method get_eps (line 189) | def get_eps(self, ticker_name:str) -> float: method get_pe_ratio (line 201) | def get_pe_ratio(self, ticker_name:str) -> float: method get_info (line 213) | def get_info(self, ticker_name:str): FILE: mock_api/cragapi/movie.py class MovieKG (line 18) | class MovieKG: method __init__ (line 23) | def __init__(self, top_n: int=10) -> None: method _normalize (line 55) | def _normalize(self, x: str) -> str: method _get_ranking_db (line 66) | def _get_ranking_db(self, db: Dict[str, Any]) -> Tuple[List[str], BM25... method _get_direct_lookup_db (line 80) | def _get_direct_lookup_db(self, db: Dict[str, Any]) -> Dict[int, Any]: method _search_entity_by_name (line 95) | def _search_entity_by_name(self, query: str, bm25: BM25Okapi, corpus: ... method get_person_info (line 118) | def get_person_info(self, person_name: str) -> List[Dict[str, Any]]: method get_movie_info (line 144) | def get_movie_info(self, person_name: str) -> List[Dict[str, Any]]: method get_year_info (line 184) | def get_year_info(self, year: str) -> Dict[str, Any]: method get_movie_info_by_id (line 207) | def get_movie_info_by_id(self, movie_id: int) -> Dict[str, Any]: method get_person_info_by_id (line 220) | def get_person_info_by_id(self, person_id: int) -> Dict[str, Any]: FILE: mock_api/cragapi/music.py class MusicKG (line 25) | class MusicKG(object): method __init__ (line 26) | def __init__(self): method normalize (line 94) | def normalize(self, x): method search_artist_entity_by_name (line 97) | def search_artist_entity_by_name(self, query): method search_song_entity_by_name (line 116) | def search_song_entity_by_name(self, query): method get_billboard_rank_date (line 135) | def get_billboard_rank_date(self, rank, date=None): method get_billboard_attributes (line 163) | def get_billboard_attributes(self, date, attribute, song_name): method grammy_get_best_artist_by_year (line 202) | def grammy_get_best_artist_by_year(self, year): method grammy_get_award_count_by_artist (line 218) | def grammy_get_award_count_by_artist(self, artist_name): method grammy_get_award_count_by_song (line 241) | def grammy_get_award_count_by_song(self, song_name): method grammy_get_best_song_by_year (line 253) | def grammy_get_best_song_by_year(self, year): method grammy_get_award_date_by_artist (line 269) | def grammy_get_award_date_by_artist(self, artist_name): method grammy_get_best_album_by_year (line 296) | def grammy_get_best_album_by_year(self, year): method grammy_get_all_awarded_artists (line 312) | def grammy_get_all_awarded_artists(self): method get_artist_birth_place (line 325) | def get_artist_birth_place(self, artist_name): method get_artist_birth_date (line 344) | def get_artist_birth_date(self, artist_name): method get_members (line 364) | def get_members(self, band_name): method get_lifespan (line 380) | def get_lifespan(self, artist_name): method get_song_author (line 399) | def get_song_author(self, song_name): method get_song_release_country (line 418) | def get_song_release_country(self, song_name): method get_song_release_date (line 437) | def get_song_release_date(self, song_name): method get_artist_all_works (line 456) | def get_artist_all_works(self, artist_name): FILE: mock_api/cragapi/open.py class OpenKG (line 19) | class OpenKG(object): method __init__ (line 20) | def __init__(self): method normalize (line 47) | def normalize(self, x): method search_entity_by_name (line 50) | def search_entity_by_name(self, query): method get_entity (line 62) | def get_entity(self, entity): FILE: mock_api/cragapi/sports.py class SoccerKG (line 20) | class SoccerKG: method __init__ (line 21) | def __init__(self, file_name='soccer_team_match_stats.pkl'): method get_games_on_date (line 33) | def get_games_on_date(self, date_str, soccer_team_name=None): class NBAKG (line 60) | class NBAKG: method __init__ (line 62) | def __init__(self): method get_time_cond (line 68) | def get_time_cond(self, date_str): method team_in_game_cond (line 83) | def team_in_game_cond(self, basketball_team_name): method get_games_on_date (line 89) | def get_games_on_date(self, date_str, basketball_team_name=None): method get_play_by_play_data_by_game_ids (line 107) | def get_play_by_play_data_by_game_ids(self, game_ids): FILE: mock_api/server.py function lifespan (line 23) | async def lifespan(app: FastAPI): function root (line 44) | async def root(): class QueryOpenName (line 48) | class QueryOpenName(BaseModel): function open_search_entity_by_name (line 68) | async def open_search_entity_by_name(query: QueryOpenName): class QueryOpenEntity (line 85) | class QueryOpenEntity(BaseModel): function open_get_entity (line 105) | async def open_get_entity(entity: QueryOpenEntity): class QueryMoviePerson (line 125) | class QueryMoviePerson(BaseModel): function movie_get_person_info (line 145) | async def movie_get_person_info(person_name: QueryMoviePerson): class QueryMovieMovie (line 174) | class QueryMovieMovie(BaseModel): function movie_get_movie_info (line 194) | async def movie_get_movie_info(person_name: QueryMovieMovie): class QueryMovieYear (line 237) | class QueryMovieYear(BaseModel): function movie_get_year_info (line 257) | async def movie_get_year_info(year: QueryMovieYear): class QueryMovieID (line 282) | class QueryMovieID(BaseModel): function movie_get_movie_info_by_id (line 302) | async def movie_get_movie_info_by_id(movie_id: QueryMovieID): function movie_get_person_info_by_id (line 327) | async def movie_get_person_info_by_id(person_id: QueryMovieID): class QueryFinanceName (line 344) | class QueryFinanceName(BaseModel): function finance_get_company_name (line 364) | async def finance_get_company_name(query: QueryFinanceName): class QueryFinanceCompanyName (line 381) | class QueryFinanceCompanyName(BaseModel): function finance_get_ticker_by_name (line 401) | async def finance_get_ticker_by_name(company_name: QueryFinanceCompanyNa... class QueryFinanceTicker (line 417) | class QueryFinanceTicker(BaseModel): function finance_get_price_history (line 437) | async def finance_get_price_history(ticker_name: QueryFinanceTicker): function finance_get_detailed_price_history (line 474) | async def finance_get_detailed_price_history(ticker_name: QueryFinanceTi... function finance_get_dividends_history (line 510) | async def finance_get_dividends_history(ticker_name: QueryFinanceTicker): function finance_get_market_capitalization (line 540) | async def finance_get_market_capitalization(ticker_name: QueryFinanceTic... function finance_get_eps (line 565) | async def finance_get_eps(ticker_name: QueryFinanceTicker): function finance_get_pe_ratio (line 590) | async def finance_get_pe_ratio(ticker_name: QueryFinanceTicker): function finance_get_info (line 615) | async def finance_get_info(ticker_name: QueryFinanceTicker): class QueryMusicArtistName (line 632) | class QueryMusicArtistName(BaseModel): function music_search_artist_entity_by_name (line 652) | async def music_search_artist_entity_by_name(query: QueryMusicArtistName): class QueryMusicSongName (line 669) | class QueryMusicSongName(BaseModel): function music_search_song_entity_by_name (line 689) | async def music_search_song_entity_by_name(query: QueryMusicSongName): class QueryMusicRank (line 705) | class QueryMusicRank(BaseModel): function music_get_billboard_rank_date (line 727) | async def music_get_billboard_rank_date(query: QueryMusicRank): class QueryMusicAttribute (line 746) | class QueryMusicAttribute(BaseModel): function music_get_billboard_attributes (line 770) | async def music_get_billboard_attributes(query: QueryMusicAttribute): class QueryMusicYear (line 789) | class QueryMusicYear(BaseModel): function music_grammy_get_best_artist_by_year (line 809) | async def music_grammy_get_best_artist_by_year(year: QueryMusicYear): class QueryMusicArtist (line 825) | class QueryMusicArtist(BaseModel): function music_grammy_get_award_count_by_artist (line 845) | async def music_grammy_get_award_count_by_artist(artist_name: QueryMusic... class QueryMusicSong (line 862) | class QueryMusicSong(BaseModel): function music_grammy_get_award_count_by_song (line 882) | async def music_grammy_get_award_count_by_song(song_name: QueryMusicSong): function music_grammy_get_best_song_by_year (line 907) | async def music_grammy_get_best_song_by_year(year: QueryMusicYear): function music_grammy_get_award_date_by_artist (line 932) | async def music_grammy_get_award_date_by_artist(artist_name: QueryMusicA... function music_grammy_get_best_album_by_year (line 957) | async def music_grammy_get_best_album_by_year(year: QueryMusicYear): function music_grammy_get_all_awarded_artists (line 982) | async def music_grammy_get_all_awarded_artists(): function music_get_artist_birth_place (line 1003) | async def music_get_artist_birth_place(artist_name: QueryMusicArtist): function music_get_artist_birth_date (line 1028) | async def music_get_artist_birth_date(artist_name: QueryMusicArtist): class QueryMusicBand (line 1045) | class QueryMusicBand(BaseModel): function music_get_members (line 1065) | async def music_get_members(band_name: QueryMusicBand): function music_get_lifespan (line 1090) | async def music_get_lifespan(artist_name: QueryMusicArtist): function music_get_song_author (line 1115) | async def music_get_song_author(song_name: QueryMusicSong): function music_get_song_release_country (line 1140) | async def music_get_song_release_country(song_name: QueryMusicSong): function music_get_song_release_date (line 1165) | async def music_get_song_release_date(song_name: QueryMusicSong): function music_get_artist_all_works (line 1189) | async def music_get_artist_all_works(artist_name: QueryMusicArtist): class QuerySportsSoccer (line 1205) | class QuerySportsSoccer(BaseModel): function sports_soccer_get_games_on_date (line 1227) | async def sports_soccer_get_games_on_date(query: QuerySportsSoccer): class QuerySportsNBA (line 1252) | class QuerySportsNBA(BaseModel): function sports_nba_get_games_on_date (line 1274) | async def sports_nba_get_games_on_date(query: QuerySportsNBA): class QuerySportsNBAGameIds (line 1300) | class QuerySportsNBAGameIds(BaseModel): function sports_nba_get_play_by_play_data_by_game_ids (line 1320) | async def sports_nba_get_play_by_play_data_by_game_ids(query: QuerySport... FILE: models/dummy_model.py class DummyModel (line 21) | class DummyModel: method __init__ (line 22) | def __init__(self): method get_batch_size (line 30) | def get_batch_size(self) -> int: method batch_generate_answer (line 42) | def batch_generate_answer(self, batch: Dict[str, Any]) -> List[str]: FILE: models/rag_knowledge_graph_baseline.py class ChunkExtractor (line 104) | class ChunkExtractor: method _extract_chunks (line 107) | def _extract_chunks(self, interaction_id, html_source): method extract_chunks (line 144) | def extract_chunks(self, batch_interaction_ids, batch_search_results): method _flatten_chunks (line 179) | def _flatten_chunks(self, chunk_dictionary): function extract_json_objects (line 204) | def extract_json_objects(text, decoder=JSONDecoder()): class RAG_KG_Model (line 221) | class RAG_KG_Model: method __init__ (line 225) | def __init__(self): method initialize_models (line 229) | def initialize_models(self): method calculate_embeddings (line 265) | def calculate_embeddings(self, sentences): method get_batch_size (line 291) | def get_batch_size(self) -> int: method batch_generate_answer (line 306) | def batch_generate_answer(self, batch: Dict[str, Any]) -> List[str]: method format_prompts (line 400) | def format_prompts(self, queries, query_times, batch_retrieval_results... method extract_entity (line 453) | def extract_entity(self, batch): method get_kg_results (line 479) | def get_kg_results(self, entities): method format_prompts_for_entity_extraction (line 553) | def format_prompts_for_entity_extraction(self, queries, query_times): FILE: models/rag_llama_baseline.py class ChunkExtractor (line 59) | class ChunkExtractor: method _extract_chunks (line 62) | def _extract_chunks(self, interaction_id, html_source): method extract_chunks (line 99) | def extract_chunks(self, batch_interaction_ids, batch_search_results): method _flatten_chunks (line 134) | def _flatten_chunks(self, chunk_dictionary): class RAGModel (line 159) | class RAGModel: method __init__ (line 163) | def __init__(self): method initialize_models (line 167) | def initialize_models(self): method calculate_embeddings (line 199) | def calculate_embeddings(self, sentences): method get_batch_size (line 225) | def get_batch_size(self) -> int: method batch_generate_answer (line 240) | def batch_generate_answer(self, batch: Dict[str, Any]) -> List[str]: method format_prompts (line 333) | def format_prompts(self, queries, query_times, batch_retrieval_results... FILE: models/utils.py function trim_predictions_to_max_token_length (line 14) | def trim_predictions_to_max_token_length(prediction): FILE: models/vanilla_llama_baseline.py class InstructModel (line 45) | class InstructModel: method __init__ (line 46) | def __init__(self): method initialize_models (line 54) | def initialize_models(self): method get_batch_size (line 78) | def get_batch_size(self) -> int: method batch_generate_answer (line 90) | def batch_generate_answer(self, batch: Dict[str, Any]) -> List[str]: method format_prommpts (line 144) | def format_prommpts(self, queries, query_times): FILE: utils/cragapi_wrapper.py class CRAG (line 18) | class CRAG(object): method __init__ (line 68) | def __init__(self, server = None): method open_search_entity_by_name (line 74) | def open_search_entity_by_name(self, query:str): method open_get_entity (line 81) | def open_get_entity(self, entity:str): method movie_get_person_info (line 88) | def movie_get_person_info(self, person_name:str): method movie_get_movie_info (line 95) | def movie_get_movie_info(self, movie_name:str): method movie_get_year_info (line 102) | def movie_get_year_info(self, year:str): method movie_get_movie_info_by_id (line 109) | def movie_get_movie_info_by_id(self, movid_id:int): method movie_get_person_info_by_id (line 116) | def movie_get_person_info_by_id(self, person_id:int): method finance_get_company_name (line 123) | def finance_get_company_name(self, query:str): method finance_get_ticker_by_name (line 130) | def finance_get_ticker_by_name(self, query:str): method finance_get_price_history (line 137) | def finance_get_price_history(self, ticker_name:str): method finance_get_detailed_price_history (line 144) | def finance_get_detailed_price_history(self, ticker_name:str): method finance_get_dividends_history (line 151) | def finance_get_dividends_history(self, ticker_name:str): method finance_get_market_capitalization (line 158) | def finance_get_market_capitalization(self, ticker_name:str): method finance_get_eps (line 165) | def finance_get_eps(self, ticker_name:str): method finance_get_pe_ratio (line 172) | def finance_get_pe_ratio(self, ticker_name:str): method finance_get_info (line 179) | def finance_get_info(self, ticker_name:str): method music_search_artist_entity_by_name (line 186) | def music_search_artist_entity_by_name(self, artist_name:str): method music_search_song_entity_by_name (line 193) | def music_search_song_entity_by_name(self, song_name:str): method music_get_billboard_rank_date (line 200) | def music_get_billboard_rank_date(self, rank:int, date:str=None): method music_get_billboard_attributes (line 207) | def music_get_billboard_attributes(self, date:str, attribute:str, song... method music_grammy_get_best_artist_by_year (line 214) | def music_grammy_get_best_artist_by_year(self, year:int): method music_grammy_get_award_count_by_artist (line 221) | def music_grammy_get_award_count_by_artist(self, artist_name:str): method music_grammy_get_award_count_by_song (line 228) | def music_grammy_get_award_count_by_song(self, song_name:str): method music_grammy_get_best_song_by_year (line 235) | def music_grammy_get_best_song_by_year(self, year:int): method music_grammy_get_award_date_by_artist (line 242) | def music_grammy_get_award_date_by_artist(self, artist_name:str): method music_grammy_get_best_album_by_year (line 249) | def music_grammy_get_best_album_by_year(self, year:int): method music_grammy_get_all_awarded_artists (line 256) | def music_grammy_get_all_awarded_artists(self): method music_get_artist_birth_place (line 262) | def music_get_artist_birth_place(self, artist_name:str): method music_get_artist_birth_date (line 269) | def music_get_artist_birth_date(self, artist_name:str): method music_get_members (line 276) | def music_get_members(self, band_name:str): method music_get_lifespan (line 283) | def music_get_lifespan(self, artist_name:str): method music_get_song_author (line 290) | def music_get_song_author(self, song_name:str): method music_get_song_release_country (line 297) | def music_get_song_release_country(self, song_name:str): method music_get_song_release_date (line 304) | def music_get_song_release_date(self, song_name:str): method music_get_artist_all_works (line 311) | def music_get_artist_all_works(self, song_name:str): method sports_soccer_get_games_on_date (line 318) | def sports_soccer_get_games_on_date(self, date:str, team_name:str=None): method sports_nba_get_games_on_date (line 325) | def sports_nba_get_games_on_date(self, date:str, team_name:str=None): method sports_nba_get_play_by_play_data_by_game_ids (line 332) | def sports_nba_get_play_by_play_data_by_game_ids(self, game_ids:List[s...