Spaces:
Sleeping
Sleeping
add files
Browse filesFiles changed (11)
- requirements.txt+37-3
- src/Fine_Tuning_TinyLlama.ipynbAdded
- src/data/index_mergedDeleted
- src/data/index_merged/bm25_merged.pklAdded+3
- src/data/index_merged/chunks_100.jsonAdded+24
- src/data/index_merged/chunks_400.jsonAdded+8
- src/data/index_merged/chunks_merged.jsonAdded+142
- src/data/index_merged/faiss_merged.indexAdded
- src/data/index_merged/meta_merged.pklAdded+3
- src/search_final.pyAdded+259
- src/streamlit_app.py+136-38
12312345678910111213141516171819202122232425262728293031323334353637altairpandasstreamlit# For loading environment variables from .envpython-dotenv# Core ML libraries for MPS/Apple Silicon compatibilitytorch>=2.1.0transformers>=4.36.0datasets>=2.15.0tokenizers>=0.15.0
# PEFT and trainingpeft>=0.7.0accelerate>=0.25.0
# RAG and Search dependenciessentence-transformers>=2.2.0faiss-cpu>=1.7.4rank-bm25>=0.2.2nltk>=3.8.0
# Data handlingpandas>=1.5.0numpy>=1.24.0
# Quantization (optional - only for CUDA, not needed for MPS)bitsandbytes>=0.42.0 # Skip on MPS/Apple Silicon
# Jupyter and developmentjupyter>=1.0.0ipywidgets>=8.0.0
# Utilitiestqdm>=4.64.0scikit-learn>=1.3.0
openai>=1.0.0streamlittorch==2.8.0huggingface_hub123version https://git-lfs.github.com/spec/v1oid sha256:d7d1d90134a1da252aa5d9d778f9d41ed03bc876cb040ad8902c552435b21b23size 54697123456789101112131415161718192021222324[ "Property, plant and equipment values: {\"2023\": \"25380\", \"2024\": \"25895\"} Intangible assets and goodwill values: {\"2023\": \"628974\", \"2024\": \"613386\"} Trade and other receivables values: {\"2023\": \"6179\", \"2024\": \"7696\"} Investment in equity-accounted investees values: {\"2023\": \"2070\", \"2024\": \"2022\"} Other investments values: {\"2023\": \"1268\", \"2024\": \"1361\"} Term deposits values: {\"2023\": \"5618\", \"2024\": \"966\"} Non-current tax assets values: {\"2023\": \"18373\", \"2024\": \"22071\"} Deferred tax assets, net values: {\"2024\": \"129317\"} Other non-current assets values: {\"2023\": \"53\", \"2024\": \"85\"} Total non-current assets values: {\"2023\": \"687915\", \"2024\": \"802799\"} Inventories values: {\"2023\": \"25\", \"2024\": \"218\"} Contract assets values: {\"2024\": \"253\"}", "Current tax assets values: {\"2024\": \"4947\"} Trade and other receivables values: {\"2023\": \"68847\", \"2024\": \"91950\"} Term deposits values: {\"2023\": \"197056\", \"2024\": \"279722\"} Other current assets values: {\"2023\": \"121964\", \"2024\": \"153123\"} Cash and cash equivalents values: {\"2023\": \"284018\", \"2024\": \"327065\"} Total current assets values: {\"2023\": \"671910\", \"2024\": \"857278\"} Total assets values: {\"2023\": \"1359825\", \"2024\": \"1660077\"} Share capital values: {\"2023\": \"53\", \"2024\": \"55\"} Share premium values: {\"2023\": \"2057362\", \"2024\": \"2161217\"} Other components of equity values: {\"2023\": \"40137\", \"2024\": \"(29899)\"} Accumulated deficit values: {\"2023\": \"(1227986)\", \"2024\": \"(1020518)\"} Total equity attributable to owners of the Company values: {\"2023\": \"869566\", \"2024\": \"1110855\"}", "Non-controlling interests values: {\"2023\": \"6490\", \"2024\": \"5563\"} Total equity values: {\"2023\": \"876056\", \"2024\": \"1116418\"} Loans and borrowings values: {\"2023\": \"15650\", \"2024\": \"216818\"} Employee benefits values: {\"2023\": \"8886\", \"2024\": \"11662\"} Contract liabilities values: {\"2023\": \"163\", \"2024\": \"408\"} Deferred tax liabilities, net values: {\"2023\": \"822\", \"2024\": \"4754\"} Other non-current liabilities values: {\"2023\": \"4590\", \"2024\": \"12443\"} Total non-current liabilities values: {\"2023\": \"30111\", \"2024\": \"246085\"} Loans and borrowings values: {\"2023\": \"219514\", \"2024\": \"4806\"} Trade and other payables values: {\"2023\": \"89780\", \"2024\": \"118548\"} Contract liabilities values: {\"2023\": \"75206\", \"2024\": \"92958\"} Other current liabilities values: {\"2023\": \"69158\", \"2024\": \"81262\"}", "Total current liabilities values: {\"2023\": \"453658\", \"2024\": \"297574\"} Total liabilities values: {\"2023\": \"483769\", \"2024\": \"543659\"} Total equity and liabilities values: {\"2023\": \"1359825\", \"2024\": \"1660077\"} Air ticketing values: {\"2022\": \"88712\", \"2023\": \"147793\", \"2024\": \"201246\"} Hotels and packages values: {\"2022\": \"157267\", \"2023\": \"337686\", \"2024\": \"435542\"} Bus ticketing values: {\"2022\": \"39896\", \"2023\": \"74873\", \"2024\": \"92693\"} Other revenue values: {\"2022\": \"18047\", \"2023\": \"32684\", \"2024\": \"53043\"} Total revenue values: {\"2022\": \"303922\", \"2023\": \"593036\", \"2024\": \"782524\"} Other income values: {\"2022\": \"3490\", \"2023\": \"2798\", \"2024\": \"770\"} Procurement cost of hotels and packages services values: {\"2022\": \"54760\", \"2023\": \"168387\", \"2024\": \"210357\"}", "Other cost of providing services values: {\"2022\": \"3990\", \"2023\": \"9180\", \"2024\": \"4732\"} Personnel expenses values: {\"2022\": \"116924\", \"2023\": \"131968\", \"2024\": \"147587\"} Marketing and sales promotion expenses values: {\"2022\": \"51033\", \"2023\": \"101601\", \"2024\": \"123304\"} Other operating expenses values: {\"2022\": \"81575\", \"2023\": \"133698\", \"2024\": \"204833\"} Depreciation, amortization and impairment values: {\"2022\": \"29496\", \"2023\": \"27396\", \"2024\": \"27267\"} Results from operating activities values: {\"2022\": \"(30366)\", \"2023\": \"23604\", \"2024\": \"65214\"} Finance income values: {\"2022\": \"9984\", \"2023\": \"10974\", \"2024\": \"24365\"} Finance costs values: {\"2022\": \"26326\", \"2023\": \"46732\", \"2024\": \"(3307)\"} Net finance income (costs) values: {\"2022\": \"(16342)\", \"2023\": \"(35758)\", \"2024\": \"27672\"}", "Share of profit of equity-accounted investees values: {\"2022\": \"34\", \"2023\": \"10\", \"2024\": \"52\"} Profit (loss) before tax values: {\"2022\": \"(46674)\", \"2023\": \"(12144)\", \"2024\": \"92938\"} Income tax benefit values: {\"2022\": \"1107\", \"2023\": \"976\", \"2024\": \"123805\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Remeasurement of defined benefit liability values: {\"2022\": \"(426)\", \"2023\": \"468\", \"2024\": \"(964)\"} Equity instruments at fair value through other values: {\"2022\": \"33543\"} operations values: {\"2022\": \"(18943)\", \"2023\": \"(48879)\", \"2024\": \"(9862)\"} Other comprehensive income (loss) for the year, net of tax values: {\"2022\": \"14174\", \"2023\": \"(48411)\", \"2024\": \"(10826)\"}", "Total comprehensive income (loss) for the year values: {\"2022\": \"(31393)\", \"2023\": \"(59579)\", \"2024\": \"205917\"} Owners of the Company values: {\"2022\": \"(45405)\", \"2023\": \"(11321)\", \"2024\": \"216801\"} Non-controlling interests values: {\"2022\": \"(162)\", \"2023\": \"153\", \"2024\": \"(58)\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Owners of the Company values: {\"2022\": \"(31216)\", \"2023\": \"(59176)\", \"2024\": \"206059\"} Non-controlling interests values: {\"2022\": \"(177)\", \"2023\": \"(403)\", \"2024\": \"(142)\"} Total comprehensive income (loss) for the year values: {\"2022\": \"(31393)\", \"2023\": \"(59579)\", \"2024\": \"205917\"} Basic values: {\"2022\": \"(0.42)\", \"2023\": \"(0.10)\", \"2024\": \"1.95\"}", "Diluted values: {\"2022\": \"(0.42)\", \"2023\": \"(0.10)\", \"2024\": \"1.74\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Depreciation values: {\"2022\": \"6023\", \"2023\": \"6096\", \"2024\": \"7436\"} Amortization values: {\"2022\": \"23335\", \"2023\": \"21150\", \"2024\": \"19809\"} Impairment of intangible assets values: {\"2022\": \"138\", \"2023\": \"150\", \"2024\": \"22\"} Impairment provision for non-financial assets values: {\"2024\": \"10047\"} Intangible assets written off values: {\"2022\": \"17\", \"2024\": \"982\"} Gain on discontinuation of equity accounted investments values: {\"2022\": \"(2251)\", \"2023\": \"(2017)\"} Net gain on de-recognition of property, plant and equipment values: {\"2022\": \"(6)\", \"2023\": \"(177)\", \"2024\": \"(132)\"}", "Gain on lease modification values: {\"2022\": \"(417)\", \"2023\": \"(100)\", \"2024\": \"(12)\"} Net finance costs (income) values: {\"2022\": \"16342\", \"2023\": \"35758\", \"2024\": \"(27672)\"} Share of profit of equity-accounted investees values: {\"2022\": \"(34)\", \"2023\": \"(10)\", \"2024\": \"(52)\"} Share based payment values: {\"2022\": \"36645\", \"2023\": \"35643\", \"2024\": \"36963\"} Income tax benefit values: {\"2022\": \"(1107)\", \"2023\": \"(976)\", \"2024\": \"(123805)\"} Property, plant and equipment values: {\"2024\": \"25895\", \"2025\": \"26457\"} Intangible assets and goodwill values: {\"2024\": \"613386\", \"2025\": \"597791\"} Trade and other receivables values: {\"2024\": \"7696\", \"2025\": \"8879\"} Investment in equity-accounted investees values: {\"2024\": \"2022\", \"2025\": \"1914\"} Other investments values: {\"2024\": \"1361\", \"2025\": \"972\"}", "Term deposits values: {\"2024\": \"966\", \"2025\": \"2130\"} Non-current tax assets, net values: {\"2024\": \"22071\", \"2025\": \"18044\"} Deferred tax assets, net values: {\"2024\": \"129317\", \"2025\": \"106431\"} Other non-current assets values: {\"2024\": \"85\", \"2025\": \"402\"} Total non-current assets values: {\"2024\": \"802799\", \"2025\": \"763020\"} Inventories values: {\"2024\": \"218\", \"2025\": \"363\"} Contract assets values: {\"2024\": \"253\", \"2025\": \"507\"} Current tax assets, net values: {\"2024\": \"4947\", \"2025\": \"9140\"} Trade and other receivables values: {\"2024\": \"91950\", \"2025\": \"141143\"} Term deposits values: {\"2024\": \"279722\", \"2025\": \"252286\"} Other current assets values: {\"2024\": \"153123\", \"2025\": \"152931\"} Cash and cash equivalents values: {\"2024\": \"327065\", \"2025\": \"508898\"}", "Total current assets values: {\"2024\": \"857278\", \"2025\": \"1065268\"} Total assets values: {\"2024\": \"1660077\", \"2025\": \"1828288\"} Share capital values: {\"2024\": \"55\", \"2025\": \"56\"} Share premium values: {\"2024\": \"2161217\", \"2025\": \"2203445\"} Other components of equity values: {\"2024\": \"(29899)\", \"2025\": \"(71003\"} Accumulated deficit values: {\"2024\": \"(1020518)\", \"2025\": \"(929868\"} Total equity attributable to owners of the Company values: {\"2024\": \"1110855\", \"2025\": \"1202630\"} Non-controlling interests values: {\"2024\": \"5563\", \"2025\": \"5347\"} Total equity values: {\"2024\": \"1116418\", \"2025\": \"1207977\"} Loans and borrowings values: {\"2024\": \"216818\", \"2025\": \"13895\"} Employee benefits values: {\"2024\": \"11662\", \"2025\": \"14705\"} Contract liabilities values: {\"2024\": \"408\", \"2025\": \"175\"}", "Deferred tax liabilities, net values: {\"2024\": \"4754\", \"2025\": \"2526\"} Other non-current liabilities values: {\"2024\": \"12443\", \"2025\": \"12396\"} Total non-current liabilities values: {\"2024\": \"246085\", \"2025\": \"43697\"} Bank overdraft values: {\"2025\": \"536\"} Loans and borrowings values: {\"2024\": \"4806\", \"2025\": \"222142\"} Trade and other payables values: {\"2024\": \"118548\", \"2025\": \"146999\"} Contract liabilities values: {\"2024\": \"92958\", \"2025\": \"120098\"} Other current liabilities values: {\"2024\": \"81262\", \"2025\": \"86839\"} Total current liabilities values: {\"2024\": \"297574\", \"2025\": \"576614\"} Total liabilities values: {\"2024\": \"543659\", \"2025\": \"620311\"} Total equity and liabilities values: {\"2024\": \"1660077\", \"2025\": \"1828288\"} Air ticketing values: {\"2023\": \"147793\", \"2024\": \"201246\", \"2025\": \"241529\"}", "Hotels and packages values: {\"2023\": \"337686\", \"2024\": \"435542\", \"2025\": \"520411\"} Bus ticketing values: {\"2023\": \"74873\", \"2024\": \"92693\", \"2025\": \"119361\"} Other revenue values: {\"2023\": \"32684\", \"2024\": \"53043\", \"2025\": \"97035\"} Total revenue values: {\"2023\": \"593036\", \"2024\": \"782524\", \"2025\": \"978336\"} Other income values: {\"2023\": \"2798\", \"2024\": \"770\", \"2025\": \"317\"} Procurement cost of hotels and packages services values: {\"2023\": \"168387\", \"2024\": \"210357\", \"2025\": \"246550\"} Other cost of providing services values: {\"2023\": \"9180\", \"2024\": \"4732\", \"2025\": \"27798\"} Personnel expenses values: {\"2023\": \"131968\", \"2024\": \"147587\", \"2025\": \"160065\"} Marketing and sales promotion expenses values: {\"2023\": \"101601\", \"2024\": \"123304\", \"2025\": \"165324\"}", "Other operating expenses values: {\"2023\": \"133698\", \"2024\": \"204833\", \"2025\": \"231905\"} Depreciation, amortization and impairment values: {\"2023\": \"27396\", \"2024\": \"27267\", \"2025\": \"27122\"} Results from operating activities values: {\"2023\": \"23604\", \"2024\": \"65214\", \"2025\": \"119889\"} Finance income values: {\"2023\": \"10974\", \"2024\": \"24365\", \"2025\": \"28256\"} Finance costs values: {\"2023\": \"46732\", \"2024\": \"(3307)\", \"2025\": \"32191\"} Net finance income (costs) values: {\"2023\": \"(35758)\", \"2024\": \"27672\", \"2025\": \"(3935)\"} Share of profit (loss) of equity-accounted investees values: {\"2023\": \"10\", \"2024\": \"52\", \"2025\": \"(64)\"} Profit (loss) before tax values: {\"2023\": \"(12144)\", \"2024\": \"92938\", \"2025\": \"115890\"} Income tax benefit (expense) values: {\"2023\": \"976\", \"2024\": \"123805\", \"2025\": \"(20616)\"}", "Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Remeasurements of defined benefit liability values: {\"2023\": \"468\", \"2024\": \"(964)\", \"2025\": \"(642)\"} Equity instruments at fair value through other values: {\"2025\": \"(452)\"} operations values: {\"2023\": \"(48879)\", \"2024\": \"(9862)\", \"2025\": \"(20898)\"} Other comprehensive loss for the year, net of tax values: {\"2023\": \"(48411)\", \"2024\": \"(10826)\", \"2025\": \"(21992)\"} Total comprehensive income (loss) for the year values: {\"2023\": \"(59579)\", \"2024\": \"205917\", \"2025\": \"73282\"} Owners of the Company values: {\"2023\": \"(11321)\", \"2024\": \"216801\", \"2025\": \"95101\"} Non-controlling interests values: {\"2023\": \"153\", \"2024\": \"(58)\", \"2025\": \"173\"}", "Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Owners of the Company values: {\"2023\": \"(59176)\", \"2024\": \"206059\", \"2025\": \"73255\"} Non-controlling interests values: {\"2023\": \"(403)\", \"2024\": \"(142)\", \"2025\": \"27\"} Total comprehensive income (loss) for the year values: {\"2023\": \"(59579)\", \"2024\": \"205917\", \"2025\": \"73282\"} Basic values: {\"2023\": \"(0.10)\", \"2024\": \"1.95\", \"2025\": \"0.84\"} Diluted values: {\"2023\": \"(0.10)\", \"2024\": \"1.74\", \"2025\": \"0.83\"} Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Depreciation values: {\"2023\": \"6096\", \"2024\": \"7436\", \"2025\": \"9110\"} Amortization values: {\"2023\": \"21150\", \"2024\": \"19809\", \"2025\": \"18012\"}", "Impairment of intangible assets values: {\"2023\": \"150\", \"2024\": \"22\"} Impairment provision for non-financial assets values: {\"2024\": \"10047\"} Intangible assets written off values: {\"2024\": \"982\", \"2025\": \"1481\"} Gain on discontinuation of equity accounted investments values: {\"2023\": \"(2017)\"} Net gain on de-recognition of property, plant and equipment values: {\"2023\": \"(177)\", \"2024\": \"(132)\", \"2025\": \"(61)\"} Gain on lease modification values: {\"2023\": \"(100)\", \"2024\": \"(12)\", \"2025\": \"(20)\"} Net finance costs (income) values: {\"2023\": \"35758\", \"2024\": \"(27672)\", \"2025\": \"3935\"} Share of (profit) loss of equity-accounted investees values: {\"2023\": \"(10)\", \"2024\": \"(52)\", \"2025\": \"64\"}", "Share based payment values: {\"2023\": \"35643\", \"2024\": \"36963\", \"2025\": \"36018\"} Income tax (benefit) expense values: {\"2023\": \"(976)\", \"2024\": \"(123805)\", \"2025\": \"20616\"} Operating cash flows before changes in following assets and liabilities values: {\"2023\": \"84349\", \"2024\": \"140329\", \"2025\": \"184429\"} Inventories values: {\"2023\": \"(6)\", \"2024\": \"(195)\", \"2025\": \"(145)\"} Trade and other receivables and contract assets values: {\"2023\": \"(37675)\", \"2024\": \"(25112)\", \"2025\": \"(52424)\"} Other assets values: {\"2023\": \"(51035)\", \"2024\": \"(42455)\", \"2025\": \"427\"} Trade and other payables and contract liabilities values: {\"2023\": \"42675\", \"2024\": \"42524\", \"2025\": \"51183\"} Employee benefits values: {\"2023\": \"879\", \"2024\": \"1705\", \"2025\": \"2272\"}", "Other liabilities values: {\"2023\": \"(2767)\", \"2024\": \"18608\", \"2025\": \"5092\"} Cash generated from operating activities values: {\"2023\": \"36420\", \"2024\": \"135404\", \"2025\": \"190834\"} Income tax paid, net values: {\"2023\": \"(4207)\", \"2024\": \"(9664)\", \"2025\": \"(5548)\"} Net cash generated from operating activities values: {\"2023\": \"32213\", \"2024\": \"125740\", \"2025\": \"185286\"} Interest received values: {\"2023\": \"8184\", \"2024\": \"21935\", \"2025\": \"24747\"} Acquisition of property, plant and equipment (refer note (a) below) values: {\"2023\": \"(7489)\", \"2024\": \"(5904)\", \"2025\": \"(4473)\"} Acquisition of intangible assets values: {\"2023\": \"(9412)\", \"2024\": \"(6920)\", \"2025\": \"(7289)\"} Proceeds from sale of property, plant and equipment values: {\"2023\": \"410\", \"2024\": \"389\", \"2025\": \"437\"}", "Redemption of term deposits values: {\"2023\": \"308308\", \"2024\": \"345903\", \"2025\": \"403195\"} Investment in term deposits values: {\"2023\": \"(251681)\", \"2024\": \"(423612)\", \"2025\": \"(379211)\"} 7 (e)) (refer note (b) below) values: {\"2023\": \"(1457)\", \"2024\": \"(6476)\", \"2025\": \"(10394)\"} Loan given to equity-accounted investee received back (refer note 37) values: {\"2024\": \"24\", \"2025\": \"24\"} Acquisition of other securities measured at FVTPL values: {\"2023\": \"(87)\", \"2024\": \"(11)\", \"2025\": \"(73)\"} Income tax paid on term deposits values: {\"2023\": \"(148)\", \"2024\": \"(918)\", \"2025\": \"(519)\"} Net cash generated from (used in) investing activities values: {\"2023\": \"46628\", \"2024\": \"(75590)\", \"2025\": \"26444\"}", "Repurchase of treasury shares (refer note 26) values: {\"2025\": \"(21722)\"} Acquisition of non-controlling interest (refer note 7(a)) values: {\"2023\": \"(5035)\", \"2024\": \"(7427)\"} Settlement of share based arrangement (refer note 33 (d) (i)) values: {\"2025\": \"(122)\"} Proceeds from issuance of shares on exercise of share based awards values: {\"2023\": \"2200\", \"2024\": \"5995\", \"2025\": \"7009\"} Proceeds from bank loans (refer note 28) values: {\"2023\": \"2168\", \"2024\": \"2114\"} Repayment of bank loans (refer note 28) values: {\"2023\": \"(749)\", \"2024\": \"(1009)\", \"2025\": \"(1455)\"} Payment of principal portion of lease liabilities (refer note 28) values: {\"2023\": \"(2415)\", \"2024\": \"(3105)\", \"2025\": \"(3763)\"}", "Interest paid, including finance and other charges (refer note 16 and 28) values: {\"2023\": \"(2376)\", \"2024\": \"(2804)\", \"2025\": \"(2838)\"} Net cash used in financing activities values: {\"2023\": \"(6207)\", \"2024\": \"(6236)\", \"2025\": \"(22891)\"} Net increase in cash and cash equivalents values: {\"2023\": \"72634\", \"2024\": \"43914\", \"2025\": \"188839\"} Cash and cash equivalents at beginning of the year values: {\"2023\": \"213283\", \"2024\": \"284018\", \"2025\": \"327065\"} Effect of exchange rate fluctuations on cash held values: {\"2023\": \"(1899)\", \"2024\": \"(867)\", \"2025\": \"(7542)\"} Cash and cash equivalents at end of the year (refer note 22) values: {\"2023\": \"284018\", \"2024\": \"327065\", \"2025\": \"508362\"}"]12345678[ "Property, plant and equipment values: {\"2023\": \"25380\", \"2024\": \"25895\"} Intangible assets and goodwill values: {\"2023\": \"628974\", \"2024\": \"613386\"} Trade and other receivables values: {\"2023\": \"6179\", \"2024\": \"7696\"} Investment in equity-accounted investees values: {\"2023\": \"2070\", \"2024\": \"2022\"} Other investments values: {\"2023\": \"1268\", \"2024\": \"1361\"} Term deposits values: {\"2023\": \"5618\", \"2024\": \"966\"} Non-current tax assets values: {\"2023\": \"18373\", \"2024\": \"22071\"} Deferred tax assets, net values: {\"2024\": \"129317\"} Other non-current assets values: {\"2023\": \"53\", \"2024\": \"85\"} Total non-current assets values: {\"2023\": \"687915\", \"2024\": \"802799\"} Inventories values: {\"2023\": \"25\", \"2024\": \"218\"} Contract assets values: {\"2024\": \"253\"} Current tax assets values: {\"2024\": \"4947\"} Trade and other receivables values: {\"2023\": \"68847\", \"2024\": \"91950\"} Term deposits values: {\"2023\": \"197056\", \"2024\": \"279722\"} Other current assets values: {\"2023\": \"121964\", \"2024\": \"153123\"} Cash and cash equivalents values: {\"2023\": \"284018\", \"2024\": \"327065\"} Total current assets values: {\"2023\": \"671910\", \"2024\": \"857278\"} Total assets values: {\"2023\": \"1359825\", \"2024\": \"1660077\"} Share capital values: {\"2023\": \"53\", \"2024\": \"55\"} Share premium values: {\"2023\": \"2057362\", \"2024\": \"2161217\"} Other components of equity values: {\"2023\": \"40137\", \"2024\": \"(29899)\"} Accumulated deficit values: {\"2023\": \"(1227986)\", \"2024\": \"(1020518)\"} Total equity attributable to owners of the Company values: {\"2023\": \"869566\", \"2024\": \"1110855\"} Non-controlling interests values: {\"2023\": \"6490\", \"2024\": \"5563\"} Total equity values: {\"2023\": \"876056\", \"2024\": \"1116418\"} Loans and borrowings values: {\"2023\": \"15650\", \"2024\": \"216818\"} Employee benefits values: {\"2023\": \"8886\", \"2024\": \"11662\"} Contract liabilities values: {\"2023\": \"163\", \"2024\": \"408\"} Deferred tax liabilities, net values: {\"2023\": \"822\", \"2024\": \"4754\"} Other non-current liabilities values: {\"2023\": \"4590\", \"2024\": \"12443\"} Total non-current liabilities values: {\"2023\": \"30111\", \"2024\": \"246085\"} Loans and borrowings values: {\"2023\": \"219514\", \"2024\": \"4806\"} Trade and other payables values: {\"2023\": \"89780\", \"2024\": \"118548\"} Contract liabilities values: {\"2023\": \"75206\", \"2024\": \"92958\"} Other current liabilities values: {\"2023\": \"69158\", \"2024\": \"81262\"} Total current liabilities values: {\"2023\": \"453658\", \"2024\": \"297574\"} Total liabilities values: {\"2023\": \"483769\", \"2024\": \"543659\"} Total equity and liabilities values: {\"2023\": \"1359825\", \"2024\": \"1660077\"} Air ticketing values: {\"2022\": \"88712\", \"2023\": \"147793\", \"2024\": \"201246\"} Hotels and packages values: {\"2022\": \"157267\", \"2023\": \"337686\", \"2024\": \"435542\"} Bus ticketing values: {\"2022\": \"39896\", \"2023\": \"74873\", \"2024\": \"92693\"} Other revenue values: {\"2022\": \"18047\", \"2023\": \"32684\", \"2024\": \"53043\"} Total revenue values: {\"2022\": \"303922\", \"2023\": \"593036\", \"2024\": \"782524\"} Other income values: {\"2022\": \"3490\", \"2023\": \"2798\", \"2024\": \"770\"} Procurement cost of hotels and packages services values: {\"2022\": \"54760\", \"2023\": \"168387\", \"2024\": \"210357\"} Other cost of providing services values: {\"2022\": \"3990\", \"2023\": \"9180\", \"2024\": \"4732\"}", "Personnel expenses values: {\"2022\": \"116924\", \"2023\": \"131968\", \"2024\": \"147587\"} Marketing and sales promotion expenses values: {\"2022\": \"51033\", \"2023\": \"101601\", \"2024\": \"123304\"} Other operating expenses values: {\"2022\": \"81575\", \"2023\": \"133698\", \"2024\": \"204833\"} Depreciation, amortization and impairment values: {\"2022\": \"29496\", \"2023\": \"27396\", \"2024\": \"27267\"} Results from operating activities values: {\"2022\": \"(30366)\", \"2023\": \"23604\", \"2024\": \"65214\"} Finance income values: {\"2022\": \"9984\", \"2023\": \"10974\", \"2024\": \"24365\"} Finance costs values: {\"2022\": \"26326\", \"2023\": \"46732\", \"2024\": \"(3307)\"} Net finance income (costs) values: {\"2022\": \"(16342)\", \"2023\": \"(35758)\", \"2024\": \"27672\"} Share of profit of equity-accounted investees values: {\"2022\": \"34\", \"2023\": \"10\", \"2024\": \"52\"} Profit (loss) before tax values: {\"2022\": \"(46674)\", \"2023\": \"(12144)\", \"2024\": \"92938\"} Income tax benefit values: {\"2022\": \"1107\", \"2023\": \"976\", \"2024\": \"123805\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Remeasurement of defined benefit liability values: {\"2022\": \"(426)\", \"2023\": \"468\", \"2024\": \"(964)\"} Equity instruments at fair value through other values: {\"2022\": \"33543\"} operations values: {\"2022\": \"(18943)\", \"2023\": \"(48879)\", \"2024\": \"(9862)\"} Other comprehensive income (loss) for the year, net of tax values: {\"2022\": \"14174\", \"2023\": \"(48411)\", \"2024\": \"(10826)\"} Total comprehensive income (loss) for the year values: {\"2022\": \"(31393)\", \"2023\": \"(59579)\", \"2024\": \"205917\"} Owners of the Company values: {\"2022\": \"(45405)\", \"2023\": \"(11321)\", \"2024\": \"216801\"} Non-controlling interests values: {\"2022\": \"(162)\", \"2023\": \"153\", \"2024\": \"(58)\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Owners of the Company values: {\"2022\": \"(31216)\", \"2023\": \"(59176)\", \"2024\": \"206059\"} Non-controlling interests values: {\"2022\": \"(177)\", \"2023\": \"(403)\", \"2024\": \"(142)\"} Total comprehensive income (loss) for the year values: {\"2022\": \"(31393)\", \"2023\": \"(59579)\", \"2024\": \"205917\"} Basic values: {\"2022\": \"(0.42)\", \"2023\": \"(0.10)\", \"2024\": \"1.95\"} Diluted values: {\"2022\": \"(0.42)\", \"2023\": \"(0.10)\", \"2024\": \"1.74\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Depreciation values: {\"2022\": \"6023\", \"2023\": \"6096\", \"2024\": \"7436\"} Amortization values: {\"2022\": \"23335\", \"2023\": \"21150\", \"2024\": \"19809\"} Impairment of intangible assets values: {\"2022\": \"138\", \"2023\": \"150\", \"2024\": \"22\"} Impairment provision for non-financial assets values: {\"2024\": \"10047\"} Intangible assets written off values: {\"2022\": \"17\", \"2024\": \"982\"} Gain on discontinuation of equity accounted investments values: {\"2022\": \"(2251)\", \"2023\": \"(2017)\"} Net gain on de-recognition of property, plant and equipment values: {\"2022\": \"(6)\", \"2023\": \"(177)\", \"2024\": \"(132)\"} Gain on lease modification values: {\"2022\": \"(417)\", \"2023\": \"(100)\", \"2024\": \"(12)\"} Net finance costs (income) values: {\"2022\": \"16342\", \"2023\": \"35758\", \"2024\": \"(27672)\"}", "Share of profit of equity-accounted investees values: {\"2022\": \"(34)\", \"2023\": \"(10)\", \"2024\": \"(52)\"} Share based payment values: {\"2022\": \"36645\", \"2023\": \"35643\", \"2024\": \"36963\"} Income tax benefit values: {\"2022\": \"(1107)\", \"2023\": \"(976)\", \"2024\": \"(123805)\"} Property, plant and equipment values: {\"2024\": \"25895\", \"2025\": \"26457\"} Intangible assets and goodwill values: {\"2024\": \"613386\", \"2025\": \"597791\"} Trade and other receivables values: {\"2024\": \"7696\", \"2025\": \"8879\"} Investment in equity-accounted investees values: {\"2024\": \"2022\", \"2025\": \"1914\"} Other investments values: {\"2024\": \"1361\", \"2025\": \"972\"} Term deposits values: {\"2024\": \"966\", \"2025\": \"2130\"} Non-current tax assets, net values: {\"2024\": \"22071\", \"2025\": \"18044\"} Deferred tax assets, net values: {\"2024\": \"129317\", \"2025\": \"106431\"} Other non-current assets values: {\"2024\": \"85\", \"2025\": \"402\"} Total non-current assets values: {\"2024\": \"802799\", \"2025\": \"763020\"} Inventories values: {\"2024\": \"218\", \"2025\": \"363\"} Contract assets values: {\"2024\": \"253\", \"2025\": \"507\"} Current tax assets, net values: {\"2024\": \"4947\", \"2025\": \"9140\"} Trade and other receivables values: {\"2024\": \"91950\", \"2025\": \"141143\"} Term deposits values: {\"2024\": \"279722\", \"2025\": \"252286\"} Other current assets values: {\"2024\": \"153123\", \"2025\": \"152931\"} Cash and cash equivalents values: {\"2024\": \"327065\", \"2025\": \"508898\"} Total current assets values: {\"2024\": \"857278\", \"2025\": \"1065268\"} Total assets values: {\"2024\": \"1660077\", \"2025\": \"1828288\"} Share capital values: {\"2024\": \"55\", \"2025\": \"56\"} Share premium values: {\"2024\": \"2161217\", \"2025\": \"2203445\"} Other components of equity values: {\"2024\": \"(29899)\", \"2025\": \"(71003\"} Accumulated deficit values: {\"2024\": \"(1020518)\", \"2025\": \"(929868\"} Total equity attributable to owners of the Company values: {\"2024\": \"1110855\", \"2025\": \"1202630\"} Non-controlling interests values: {\"2024\": \"5563\", \"2025\": \"5347\"} Total equity values: {\"2024\": \"1116418\", \"2025\": \"1207977\"} Loans and borrowings values: {\"2024\": \"216818\", \"2025\": \"13895\"} Employee benefits values: {\"2024\": \"11662\", \"2025\": \"14705\"} Contract liabilities values: {\"2024\": \"408\", \"2025\": \"175\"} Deferred tax liabilities, net values: {\"2024\": \"4754\", \"2025\": \"2526\"} Other non-current liabilities values: {\"2024\": \"12443\", \"2025\": \"12396\"} Total non-current liabilities values: {\"2024\": \"246085\", \"2025\": \"43697\"} Bank overdraft values: {\"2025\": \"536\"} Loans and borrowings values: {\"2024\": \"4806\", \"2025\": \"222142\"} Trade and other payables values: {\"2024\": \"118548\", \"2025\": \"146999\"} Contract liabilities values: {\"2024\": \"92958\", \"2025\": \"120098\"} Other current liabilities values: {\"2024\": \"81262\", \"2025\": \"86839\"} Total current liabilities values: {\"2024\": \"297574\", \"2025\": \"576614\"} Total liabilities values: {\"2024\": \"543659\", \"2025\": \"620311\"} Total equity and liabilities values: {\"2024\": \"1660077\", \"2025\": \"1828288\"} Air ticketing values: {\"2023\": \"147793\", \"2024\": \"201246\", \"2025\": \"241529\"} Hotels and packages values: {\"2023\": \"337686\", \"2024\": \"435542\", \"2025\": \"520411\"} Bus ticketing values: {\"2023\": \"74873\", \"2024\": \"92693\", \"2025\": \"119361\"} Other revenue values: {\"2023\": \"32684\", \"2024\": \"53043\", \"2025\": \"97035\"}", "Total revenue values: {\"2023\": \"593036\", \"2024\": \"782524\", \"2025\": \"978336\"} Other income values: {\"2023\": \"2798\", \"2024\": \"770\", \"2025\": \"317\"} Procurement cost of hotels and packages services values: {\"2023\": \"168387\", \"2024\": \"210357\", \"2025\": \"246550\"} Other cost of providing services values: {\"2023\": \"9180\", \"2024\": \"4732\", \"2025\": \"27798\"} Personnel expenses values: {\"2023\": \"131968\", \"2024\": \"147587\", \"2025\": \"160065\"} Marketing and sales promotion expenses values: {\"2023\": \"101601\", \"2024\": \"123304\", \"2025\": \"165324\"} Other operating expenses values: {\"2023\": \"133698\", \"2024\": \"204833\", \"2025\": \"231905\"} Depreciation, amortization and impairment values: {\"2023\": \"27396\", \"2024\": \"27267\", \"2025\": \"27122\"} Results from operating activities values: {\"2023\": \"23604\", \"2024\": \"65214\", \"2025\": \"119889\"} Finance income values: {\"2023\": \"10974\", \"2024\": \"24365\", \"2025\": \"28256\"} Finance costs values: {\"2023\": \"46732\", \"2024\": \"(3307)\", \"2025\": \"32191\"} Net finance income (costs) values: {\"2023\": \"(35758)\", \"2024\": \"27672\", \"2025\": \"(3935)\"} Share of profit (loss) of equity-accounted investees values: {\"2023\": \"10\", \"2024\": \"52\", \"2025\": \"(64)\"} Profit (loss) before tax values: {\"2023\": \"(12144)\", \"2024\": \"92938\", \"2025\": \"115890\"} Income tax benefit (expense) values: {\"2023\": \"976\", \"2024\": \"123805\", \"2025\": \"(20616)\"} Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Remeasurements of defined benefit liability values: {\"2023\": \"468\", \"2024\": \"(964)\", \"2025\": \"(642)\"} Equity instruments at fair value through other values: {\"2025\": \"(452)\"} operations values: {\"2023\": \"(48879)\", \"2024\": \"(9862)\", \"2025\": \"(20898)\"} Other comprehensive loss for the year, net of tax values: {\"2023\": \"(48411)\", \"2024\": \"(10826)\", \"2025\": \"(21992)\"} Total comprehensive income (loss) for the year values: {\"2023\": \"(59579)\", \"2024\": \"205917\", \"2025\": \"73282\"} Owners of the Company values: {\"2023\": \"(11321)\", \"2024\": \"216801\", \"2025\": \"95101\"} Non-controlling interests values: {\"2023\": \"153\", \"2024\": \"(58)\", \"2025\": \"173\"} Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Owners of the Company values: {\"2023\": \"(59176)\", \"2024\": \"206059\", \"2025\": \"73255\"} Non-controlling interests values: {\"2023\": \"(403)\", \"2024\": \"(142)\", \"2025\": \"27\"} Total comprehensive income (loss) for the year values: {\"2023\": \"(59579)\", \"2024\": \"205917\", \"2025\": \"73282\"} Basic values: {\"2023\": \"(0.10)\", \"2024\": \"1.95\", \"2025\": \"0.84\"} Diluted values: {\"2023\": \"(0.10)\", \"2024\": \"1.74\", \"2025\": \"0.83\"} Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Depreciation values: {\"2023\": \"6096\", \"2024\": \"7436\", \"2025\": \"9110\"} Amortization values: {\"2023\": \"21150\", \"2024\": \"19809\", \"2025\": \"18012\"} Impairment of intangible assets values: {\"2023\": \"150\", \"2024\": \"22\"} Impairment provision for non-financial assets values: {\"2024\": \"10047\"} Intangible assets written off values: {\"2024\": \"982\", \"2025\": \"1481\"} Gain on discontinuation of equity accounted investments values: {\"2023\": \"(2017)\"}", "Net gain on de-recognition of property, plant and equipment values: {\"2023\": \"(177)\", \"2024\": \"(132)\", \"2025\": \"(61)\"} Gain on lease modification values: {\"2023\": \"(100)\", \"2024\": \"(12)\", \"2025\": \"(20)\"} Net finance costs (income) values: {\"2023\": \"35758\", \"2024\": \"(27672)\", \"2025\": \"3935\"} Share of (profit) loss of equity-accounted investees values: {\"2023\": \"(10)\", \"2024\": \"(52)\", \"2025\": \"64\"} Share based payment values: {\"2023\": \"35643\", \"2024\": \"36963\", \"2025\": \"36018\"} Income tax (benefit) expense values: {\"2023\": \"(976)\", \"2024\": \"(123805)\", \"2025\": \"20616\"} Operating cash flows before changes in following assets and liabilities values: {\"2023\": \"84349\", \"2024\": \"140329\", \"2025\": \"184429\"} Inventories values: {\"2023\": \"(6)\", \"2024\": \"(195)\", \"2025\": \"(145)\"} Trade and other receivables and contract assets values: {\"2023\": \"(37675)\", \"2024\": \"(25112)\", \"2025\": \"(52424)\"} Other assets values: {\"2023\": \"(51035)\", \"2024\": \"(42455)\", \"2025\": \"427\"} Trade and other payables and contract liabilities values: {\"2023\": \"42675\", \"2024\": \"42524\", \"2025\": \"51183\"} Employee benefits values: {\"2023\": \"879\", \"2024\": \"1705\", \"2025\": \"2272\"} Other liabilities values: {\"2023\": \"(2767)\", \"2024\": \"18608\", \"2025\": \"5092\"} Cash generated from operating activities values: {\"2023\": \"36420\", \"2024\": \"135404\", \"2025\": \"190834\"} Income tax paid, net values: {\"2023\": \"(4207)\", \"2024\": \"(9664)\", \"2025\": \"(5548)\"} Net cash generated from operating activities values: {\"2023\": \"32213\", \"2024\": \"125740\", \"2025\": \"185286\"} Interest received values: {\"2023\": \"8184\", \"2024\": \"21935\", \"2025\": \"24747\"} Acquisition of property, plant and equipment (refer note (a) below) values: {\"2023\": \"(7489)\", \"2024\": \"(5904)\", \"2025\": \"(4473)\"} Acquisition of intangible assets values: {\"2023\": \"(9412)\", \"2024\": \"(6920)\", \"2025\": \"(7289)\"} Proceeds from sale of property, plant and equipment values: {\"2023\": \"410\", \"2024\": \"389\", \"2025\": \"437\"} Redemption of term deposits values: {\"2023\": \"308308\", \"2024\": \"345903\", \"2025\": \"403195\"} Investment in term deposits values: {\"2023\": \"(251681)\", \"2024\": \"(423612)\", \"2025\": \"(379211)\"} 7 (e)) (refer note (b) below) values: {\"2023\": \"(1457)\", \"2024\": \"(6476)\", \"2025\": \"(10394)\"} Loan given to equity-accounted investee received back (refer note 37) values: {\"2024\": \"24\", \"2025\": \"24\"} Acquisition of other securities measured at FVTPL values: {\"2023\": \"(87)\", \"2024\": \"(11)\", \"2025\": \"(73)\"} Income tax paid on term deposits values: {\"2023\": \"(148)\", \"2024\": \"(918)\", \"2025\": \"(519)\"} Net cash generated from (used in) investing activities values: {\"2023\": \"46628\", \"2024\": \"(75590)\", \"2025\": \"26444\"} Repurchase of treasury shares (refer note 26) values: {\"2025\": \"(21722)\"} Acquisition of non-controlling interest (refer note 7(a)) values: {\"2023\": \"(5035)\", \"2024\": \"(7427)\"} Settlement of share based arrangement (refer note 33 (d) (i)) values: {\"2025\": \"(122)\"} Proceeds from issuance of shares on exercise of share based awards values: {\"2023\": \"2200\", \"2024\": \"5995\", \"2025\": \"7009\"}", "Proceeds from bank loans (refer note 28) values: {\"2023\": \"2168\", \"2024\": \"2114\"} Repayment of bank loans (refer note 28) values: {\"2023\": \"(749)\", \"2024\": \"(1009)\", \"2025\": \"(1455)\"} Payment of principal portion of lease liabilities (refer note 28) values: {\"2023\": \"(2415)\", \"2024\": \"(3105)\", \"2025\": \"(3763)\"} Interest paid, including finance and other charges (refer note 16 and 28) values: {\"2023\": \"(2376)\", \"2024\": \"(2804)\", \"2025\": \"(2838)\"} Net cash used in financing activities values: {\"2023\": \"(6207)\", \"2024\": \"(6236)\", \"2025\": \"(22891)\"} Net increase in cash and cash equivalents values: {\"2023\": \"72634\", \"2024\": \"43914\", \"2025\": \"188839\"} Cash and cash equivalents at beginning of the year values: {\"2023\": \"213283\", \"2024\": \"284018\", \"2025\": \"327065\"} Effect of exchange rate fluctuations on cash held values: {\"2023\": \"(1899)\", \"2024\": \"(867)\", \"2025\": \"(7542)\"} Cash and cash equivalents at end of the year (refer note 22) values: {\"2023\": \"284018\", \"2024\": \"327065\", \"2025\": \"508362\"}"]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142[ { "id": "100-0", "chunk_size": 100, "content": "Property, plant and equipment values: {\"2023\": \"25380\", \"2024\": \"25895\"} Intangible assets and goodwill values: {\"2023\": \"628974\", \"2024\": \"613386\"} Trade and other receivables values: {\"2023\": \"6179\", \"2024\": \"7696\"} Investment in equity-accounted investees values: {\"2023\": \"2070\", \"2024\": \"2022\"} Other investments values: {\"2023\": \"1268\", \"2024\": \"1361\"} Term deposits values: {\"2023\": \"5618\", \"2024\": \"966\"} Non-current tax assets values: {\"2023\": \"18373\", \"2024\": \"22071\"} Deferred tax assets, net values: {\"2024\": \"129317\"} Other non-current assets values: {\"2023\": \"53\", \"2024\": \"85\"} Total non-current assets values: {\"2023\": \"687915\", \"2024\": \"802799\"} Inventories values: {\"2023\": \"25\", \"2024\": \"218\"} Contract assets values: {\"2024\": \"253\"}" }, { "id": "100-1", "chunk_size": 100, "content": "Current tax assets values: {\"2024\": \"4947\"} Trade and other receivables values: {\"2023\": \"68847\", \"2024\": \"91950\"} Term deposits values: {\"2023\": \"197056\", \"2024\": \"279722\"} Other current assets values: {\"2023\": \"121964\", \"2024\": \"153123\"} Cash and cash equivalents values: {\"2023\": \"284018\", \"2024\": \"327065\"} Total current assets values: {\"2023\": \"671910\", \"2024\": \"857278\"} Total assets values: {\"2023\": \"1359825\", \"2024\": \"1660077\"} Share capital values: {\"2023\": \"53\", \"2024\": \"55\"} Share premium values: {\"2023\": \"2057362\", \"2024\": \"2161217\"} Other components of equity values: {\"2023\": \"40137\", \"2024\": \"(29899)\"} Accumulated deficit values: {\"2023\": \"(1227986)\", \"2024\": \"(1020518)\"} Total equity attributable to owners of the Company values: {\"2023\": \"869566\", \"2024\": \"1110855\"}" }, { "id": "100-2", "chunk_size": 100, "content": "Non-controlling interests values: {\"2023\": \"6490\", \"2024\": \"5563\"} Total equity values: {\"2023\": \"876056\", \"2024\": \"1116418\"} Loans and borrowings values: {\"2023\": \"15650\", \"2024\": \"216818\"} Employee benefits values: {\"2023\": \"8886\", \"2024\": \"11662\"} Contract liabilities values: {\"2023\": \"163\", \"2024\": \"408\"} Deferred tax liabilities, net values: {\"2023\": \"822\", \"2024\": \"4754\"} Other non-current liabilities values: {\"2023\": \"4590\", \"2024\": \"12443\"} Total non-current liabilities values: {\"2023\": \"30111\", \"2024\": \"246085\"} Loans and borrowings values: {\"2023\": \"219514\", \"2024\": \"4806\"} Trade and other payables values: {\"2023\": \"89780\", \"2024\": \"118548\"} Contract liabilities values: {\"2023\": \"75206\", \"2024\": \"92958\"} Other current liabilities values: {\"2023\": \"69158\", \"2024\": \"81262\"}" }, { "id": "100-3", "chunk_size": 100, "content": "Total current liabilities values: {\"2023\": \"453658\", \"2024\": \"297574\"} Total liabilities values: {\"2023\": \"483769\", \"2024\": \"543659\"} Total equity and liabilities values: {\"2023\": \"1359825\", \"2024\": \"1660077\"} Air ticketing values: {\"2022\": \"88712\", \"2023\": \"147793\", \"2024\": \"201246\"} Hotels and packages values: {\"2022\": \"157267\", \"2023\": \"337686\", \"2024\": \"435542\"} Bus ticketing values: {\"2022\": \"39896\", \"2023\": \"74873\", \"2024\": \"92693\"} Other revenue values: {\"2022\": \"18047\", \"2023\": \"32684\", \"2024\": \"53043\"} Total revenue values: {\"2022\": \"303922\", \"2023\": \"593036\", \"2024\": \"782524\"} Other income values: {\"2022\": \"3490\", \"2023\": \"2798\", \"2024\": \"770\"} Procurement cost of hotels and packages services values: {\"2022\": \"54760\", \"2023\": \"168387\", \"2024\": \"210357\"}" }, { "id": "100-4", "chunk_size": 100, "content": "Other cost of providing services values: {\"2022\": \"3990\", \"2023\": \"9180\", \"2024\": \"4732\"} Personnel expenses values: {\"2022\": \"116924\", \"2023\": \"131968\", \"2024\": \"147587\"} Marketing and sales promotion expenses values: {\"2022\": \"51033\", \"2023\": \"101601\", \"2024\": \"123304\"} Other operating expenses values: {\"2022\": \"81575\", \"2023\": \"133698\", \"2024\": \"204833\"} Depreciation, amortization and impairment values: {\"2022\": \"29496\", \"2023\": \"27396\", \"2024\": \"27267\"} Results from operating activities values: {\"2022\": \"(30366)\", \"2023\": \"23604\", \"2024\": \"65214\"} Finance income values: {\"2022\": \"9984\", \"2023\": \"10974\", \"2024\": \"24365\"} Finance costs values: {\"2022\": \"26326\", \"2023\": \"46732\", \"2024\": \"(3307)\"} Net finance income (costs) values: {\"2022\": \"(16342)\", \"2023\": \"(35758)\", \"2024\": \"27672\"}" }, { "id": "100-5", "chunk_size": 100, "content": "Share of profit of equity-accounted investees values: {\"2022\": \"34\", \"2023\": \"10\", \"2024\": \"52\"} Profit (loss) before tax values: {\"2022\": \"(46674)\", \"2023\": \"(12144)\", \"2024\": \"92938\"} Income tax benefit values: {\"2022\": \"1107\", \"2023\": \"976\", \"2024\": \"123805\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Remeasurement of defined benefit liability values: {\"2022\": \"(426)\", \"2023\": \"468\", \"2024\": \"(964)\"} Equity instruments at fair value through other values: {\"2022\": \"33543\"} operations values: {\"2022\": \"(18943)\", \"2023\": \"(48879)\", \"2024\": \"(9862)\"} Other comprehensive income (loss) for the year, net of tax values: {\"2022\": \"14174\", \"2023\": \"(48411)\", \"2024\": \"(10826)\"}" }, { "id": "100-6", "chunk_size": 100, "content": "Total comprehensive income (loss) for the year values: {\"2022\": \"(31393)\", \"2023\": \"(59579)\", \"2024\": \"205917\"} Owners of the Company values: {\"2022\": \"(45405)\", \"2023\": \"(11321)\", \"2024\": \"216801\"} Non-controlling interests values: {\"2022\": \"(162)\", \"2023\": \"153\", \"2024\": \"(58)\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Owners of the Company values: {\"2022\": \"(31216)\", \"2023\": \"(59176)\", \"2024\": \"206059\"} Non-controlling interests values: {\"2022\": \"(177)\", \"2023\": \"(403)\", \"2024\": \"(142)\"} Total comprehensive income (loss) for the year values: {\"2022\": \"(31393)\", \"2023\": \"(59579)\", \"2024\": \"205917\"} Basic values: {\"2022\": \"(0.42)\", \"2023\": \"(0.10)\", \"2024\": \"1.95\"}" }, { "id": "100-7", "chunk_size": 100, "content": "Diluted values: {\"2022\": \"(0.42)\", \"2023\": \"(0.10)\", \"2024\": \"1.74\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Depreciation values: {\"2022\": \"6023\", \"2023\": \"6096\", \"2024\": \"7436\"} Amortization values: {\"2022\": \"23335\", \"2023\": \"21150\", \"2024\": \"19809\"} Impairment of intangible assets values: {\"2022\": \"138\", \"2023\": \"150\", \"2024\": \"22\"} Impairment provision for non-financial assets values: {\"2024\": \"10047\"} Intangible assets written off values: {\"2022\": \"17\", \"2024\": \"982\"} Gain on discontinuation of equity accounted investments values: {\"2022\": \"(2251)\", \"2023\": \"(2017)\"} Net gain on de-recognition of property, plant and equipment values: {\"2022\": \"(6)\", \"2023\": \"(177)\", \"2024\": \"(132)\"}" }, { "id": "100-8", "chunk_size": 100, "content": "Gain on lease modification values: {\"2022\": \"(417)\", \"2023\": \"(100)\", \"2024\": \"(12)\"} Net finance costs (income) values: {\"2022\": \"16342\", \"2023\": \"35758\", \"2024\": \"(27672)\"} Share of profit of equity-accounted investees values: {\"2022\": \"(34)\", \"2023\": \"(10)\", \"2024\": \"(52)\"} Share based payment values: {\"2022\": \"36645\", \"2023\": \"35643\", \"2024\": \"36963\"} Income tax benefit values: {\"2022\": \"(1107)\", \"2023\": \"(976)\", \"2024\": \"(123805)\"} Property, plant and equipment values: {\"2024\": \"25895\", \"2025\": \"26457\"} Intangible assets and goodwill values: {\"2024\": \"613386\", \"2025\": \"597791\"} Trade and other receivables values: {\"2024\": \"7696\", \"2025\": \"8879\"} Investment in equity-accounted investees values: {\"2024\": \"2022\", \"2025\": \"1914\"} Other investments values: {\"2024\": \"1361\", \"2025\": \"972\"}" }, { "id": "100-9", "chunk_size": 100, "content": "Term deposits values: {\"2024\": \"966\", \"2025\": \"2130\"} Non-current tax assets, net values: {\"2024\": \"22071\", \"2025\": \"18044\"} Deferred tax assets, net values: {\"2024\": \"129317\", \"2025\": \"106431\"} Other non-current assets values: {\"2024\": \"85\", \"2025\": \"402\"} Total non-current assets values: {\"2024\": \"802799\", \"2025\": \"763020\"} Inventories values: {\"2024\": \"218\", \"2025\": \"363\"} Contract assets values: {\"2024\": \"253\", \"2025\": \"507\"} Current tax assets, net values: {\"2024\": \"4947\", \"2025\": \"9140\"} Trade and other receivables values: {\"2024\": \"91950\", \"2025\": \"141143\"} Term deposits values: {\"2024\": \"279722\", \"2025\": \"252286\"} Other current assets values: {\"2024\": \"153123\", \"2025\": \"152931\"} Cash and cash equivalents values: {\"2024\": \"327065\", \"2025\": \"508898\"}" }, { "id": "100-10", "chunk_size": 100, "content": "Total current assets values: {\"2024\": \"857278\", \"2025\": \"1065268\"} Total assets values: {\"2024\": \"1660077\", \"2025\": \"1828288\"} Share capital values: {\"2024\": \"55\", \"2025\": \"56\"} Share premium values: {\"2024\": \"2161217\", \"2025\": \"2203445\"} Other components of equity values: {\"2024\": \"(29899)\", \"2025\": \"(71003\"} Accumulated deficit values: {\"2024\": \"(1020518)\", \"2025\": \"(929868\"} Total equity attributable to owners of the Company values: {\"2024\": \"1110855\", \"2025\": \"1202630\"} Non-controlling interests values: {\"2024\": \"5563\", \"2025\": \"5347\"} Total equity values: {\"2024\": \"1116418\", \"2025\": \"1207977\"} Loans and borrowings values: {\"2024\": \"216818\", \"2025\": \"13895\"} Employee benefits values: {\"2024\": \"11662\", \"2025\": \"14705\"} Contract liabilities values: {\"2024\": \"408\", \"2025\": \"175\"}" }, { "id": "100-11", "chunk_size": 100, "content": "Deferred tax liabilities, net values: {\"2024\": \"4754\", \"2025\": \"2526\"} Other non-current liabilities values: {\"2024\": \"12443\", \"2025\": \"12396\"} Total non-current liabilities values: {\"2024\": \"246085\", \"2025\": \"43697\"} Bank overdraft values: {\"2025\": \"536\"} Loans and borrowings values: {\"2024\": \"4806\", \"2025\": \"222142\"} Trade and other payables values: {\"2024\": \"118548\", \"2025\": \"146999\"} Contract liabilities values: {\"2024\": \"92958\", \"2025\": \"120098\"} Other current liabilities values: {\"2024\": \"81262\", \"2025\": \"86839\"} Total current liabilities values: {\"2024\": \"297574\", \"2025\": \"576614\"} Total liabilities values: {\"2024\": \"543659\", \"2025\": \"620311\"} Total equity and liabilities values: {\"2024\": \"1660077\", \"2025\": \"1828288\"} Air ticketing values: {\"2023\": \"147793\", \"2024\": \"201246\", \"2025\": \"241529\"}" }, { "id": "100-12", "chunk_size": 100, "content": "Hotels and packages values: {\"2023\": \"337686\", \"2024\": \"435542\", \"2025\": \"520411\"} Bus ticketing values: {\"2023\": \"74873\", \"2024\": \"92693\", \"2025\": \"119361\"} Other revenue values: {\"2023\": \"32684\", \"2024\": \"53043\", \"2025\": \"97035\"} Total revenue values: {\"2023\": \"593036\", \"2024\": \"782524\", \"2025\": \"978336\"} Other income values: {\"2023\": \"2798\", \"2024\": \"770\", \"2025\": \"317\"} Procurement cost of hotels and packages services values: {\"2023\": \"168387\", \"2024\": \"210357\", \"2025\": \"246550\"} Other cost of providing services values: {\"2023\": \"9180\", \"2024\": \"4732\", \"2025\": \"27798\"} Personnel expenses values: {\"2023\": \"131968\", \"2024\": \"147587\", \"2025\": \"160065\"} Marketing and sales promotion expenses values: {\"2023\": \"101601\", \"2024\": \"123304\", \"2025\": \"165324\"}" }, { "id": "100-13", "chunk_size": 100, "content": "Other operating expenses values: {\"2023\": \"133698\", \"2024\": \"204833\", \"2025\": \"231905\"} Depreciation, amortization and impairment values: {\"2023\": \"27396\", \"2024\": \"27267\", \"2025\": \"27122\"} Results from operating activities values: {\"2023\": \"23604\", \"2024\": \"65214\", \"2025\": \"119889\"} Finance income values: {\"2023\": \"10974\", \"2024\": \"24365\", \"2025\": \"28256\"} Finance costs values: {\"2023\": \"46732\", \"2024\": \"(3307)\", \"2025\": \"32191\"} Net finance income (costs) values: {\"2023\": \"(35758)\", \"2024\": \"27672\", \"2025\": \"(3935)\"} Share of profit (loss) of equity-accounted investees values: {\"2023\": \"10\", \"2024\": \"52\", \"2025\": \"(64)\"} Profit (loss) before tax values: {\"2023\": \"(12144)\", \"2024\": \"92938\", \"2025\": \"115890\"} Income tax benefit (expense) values: {\"2023\": \"976\", \"2024\": \"123805\", \"2025\": \"(20616)\"}" }, { "id": "100-14", "chunk_size": 100, "content": "Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Remeasurements of defined benefit liability values: {\"2023\": \"468\", \"2024\": \"(964)\", \"2025\": \"(642)\"} Equity instruments at fair value through other values: {\"2025\": \"(452)\"} operations values: {\"2023\": \"(48879)\", \"2024\": \"(9862)\", \"2025\": \"(20898)\"} Other comprehensive loss for the year, net of tax values: {\"2023\": \"(48411)\", \"2024\": \"(10826)\", \"2025\": \"(21992)\"} Total comprehensive income (loss) for the year values: {\"2023\": \"(59579)\", \"2024\": \"205917\", \"2025\": \"73282\"} Owners of the Company values: {\"2023\": \"(11321)\", \"2024\": \"216801\", \"2025\": \"95101\"} Non-controlling interests values: {\"2023\": \"153\", \"2024\": \"(58)\", \"2025\": \"173\"}" }, { "id": "100-15", "chunk_size": 100, "content": "Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Owners of the Company values: {\"2023\": \"(59176)\", \"2024\": \"206059\", \"2025\": \"73255\"} Non-controlling interests values: {\"2023\": \"(403)\", \"2024\": \"(142)\", \"2025\": \"27\"} Total comprehensive income (loss) for the year values: {\"2023\": \"(59579)\", \"2024\": \"205917\", \"2025\": \"73282\"} Basic values: {\"2023\": \"(0.10)\", \"2024\": \"1.95\", \"2025\": \"0.84\"} Diluted values: {\"2023\": \"(0.10)\", \"2024\": \"1.74\", \"2025\": \"0.83\"} Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Depreciation values: {\"2023\": \"6096\", \"2024\": \"7436\", \"2025\": \"9110\"} Amortization values: {\"2023\": \"21150\", \"2024\": \"19809\", \"2025\": \"18012\"}" }, { "id": "100-16", "chunk_size": 100, "content": "Impairment of intangible assets values: {\"2023\": \"150\", \"2024\": \"22\"} Impairment provision for non-financial assets values: {\"2024\": \"10047\"} Intangible assets written off values: {\"2024\": \"982\", \"2025\": \"1481\"} Gain on discontinuation of equity accounted investments values: {\"2023\": \"(2017)\"} Net gain on de-recognition of property, plant and equipment values: {\"2023\": \"(177)\", \"2024\": \"(132)\", \"2025\": \"(61)\"} Gain on lease modification values: {\"2023\": \"(100)\", \"2024\": \"(12)\", \"2025\": \"(20)\"} Net finance costs (income) values: {\"2023\": \"35758\", \"2024\": \"(27672)\", \"2025\": \"3935\"} Share of (profit) loss of equity-accounted investees values: {\"2023\": \"(10)\", \"2024\": \"(52)\", \"2025\": \"64\"}" }, { "id": "100-17", "chunk_size": 100, "content": "Share based payment values: {\"2023\": \"35643\", \"2024\": \"36963\", \"2025\": \"36018\"} Income tax (benefit) expense values: {\"2023\": \"(976)\", \"2024\": \"(123805)\", \"2025\": \"20616\"} Operating cash flows before changes in following assets and liabilities values: {\"2023\": \"84349\", \"2024\": \"140329\", \"2025\": \"184429\"} Inventories values: {\"2023\": \"(6)\", \"2024\": \"(195)\", \"2025\": \"(145)\"} Trade and other receivables and contract assets values: {\"2023\": \"(37675)\", \"2024\": \"(25112)\", \"2025\": \"(52424)\"} Other assets values: {\"2023\": \"(51035)\", \"2024\": \"(42455)\", \"2025\": \"427\"} Trade and other payables and contract liabilities values: {\"2023\": \"42675\", \"2024\": \"42524\", \"2025\": \"51183\"} Employee benefits values: {\"2023\": \"879\", \"2024\": \"1705\", \"2025\": \"2272\"}" }, { "id": "100-18", "chunk_size": 100, "content": "Other liabilities values: {\"2023\": \"(2767)\", \"2024\": \"18608\", \"2025\": \"5092\"} Cash generated from operating activities values: {\"2023\": \"36420\", \"2024\": \"135404\", \"2025\": \"190834\"} Income tax paid, net values: {\"2023\": \"(4207)\", \"2024\": \"(9664)\", \"2025\": \"(5548)\"} Net cash generated from operating activities values: {\"2023\": \"32213\", \"2024\": \"125740\", \"2025\": \"185286\"} Interest received values: {\"2023\": \"8184\", \"2024\": \"21935\", \"2025\": \"24747\"} Acquisition of property, plant and equipment (refer note (a) below) values: {\"2023\": \"(7489)\", \"2024\": \"(5904)\", \"2025\": \"(4473)\"} Acquisition of intangible assets values: {\"2023\": \"(9412)\", \"2024\": \"(6920)\", \"2025\": \"(7289)\"} Proceeds from sale of property, plant and equipment values: {\"2023\": \"410\", \"2024\": \"389\", \"2025\": \"437\"}" }, { "id": "100-19", "chunk_size": 100, "content": "Redemption of term deposits values: {\"2023\": \"308308\", \"2024\": \"345903\", \"2025\": \"403195\"} Investment in term deposits values: {\"2023\": \"(251681)\", \"2024\": \"(423612)\", \"2025\": \"(379211)\"} 7 (e)) (refer note (b) below) values: {\"2023\": \"(1457)\", \"2024\": \"(6476)\", \"2025\": \"(10394)\"} Loan given to equity-accounted investee received back (refer note 37) values: {\"2024\": \"24\", \"2025\": \"24\"} Acquisition of other securities measured at FVTPL values: {\"2023\": \"(87)\", \"2024\": \"(11)\", \"2025\": \"(73)\"} Income tax paid on term deposits values: {\"2023\": \"(148)\", \"2024\": \"(918)\", \"2025\": \"(519)\"} Net cash generated from (used in) investing activities values: {\"2023\": \"46628\", \"2024\": \"(75590)\", \"2025\": \"26444\"}" }, { "id": "100-20", "chunk_size": 100, "content": "Repurchase of treasury shares (refer note 26) values: {\"2025\": \"(21722)\"} Acquisition of non-controlling interest (refer note 7(a)) values: {\"2023\": \"(5035)\", \"2024\": \"(7427)\"} Settlement of share based arrangement (refer note 33 (d) (i)) values: {\"2025\": \"(122)\"} Proceeds from issuance of shares on exercise of share based awards values: {\"2023\": \"2200\", \"2024\": \"5995\", \"2025\": \"7009\"} Proceeds from bank loans (refer note 28) values: {\"2023\": \"2168\", \"2024\": \"2114\"} Repayment of bank loans (refer note 28) values: {\"2023\": \"(749)\", \"2024\": \"(1009)\", \"2025\": \"(1455)\"} Payment of principal portion of lease liabilities (refer note 28) values: {\"2023\": \"(2415)\", \"2024\": \"(3105)\", \"2025\": \"(3763)\"}" }, { "id": "100-21", "chunk_size": 100, "content": "Interest paid, including finance and other charges (refer note 16 and 28) values: {\"2023\": \"(2376)\", \"2024\": \"(2804)\", \"2025\": \"(2838)\"} Net cash used in financing activities values: {\"2023\": \"(6207)\", \"2024\": \"(6236)\", \"2025\": \"(22891)\"} Net increase in cash and cash equivalents values: {\"2023\": \"72634\", \"2024\": \"43914\", \"2025\": \"188839\"} Cash and cash equivalents at beginning of the year values: {\"2023\": \"213283\", \"2024\": \"284018\", \"2025\": \"327065\"} Effect of exchange rate fluctuations on cash held values: {\"2023\": \"(1899)\", \"2024\": \"(867)\", \"2025\": \"(7542)\"} Cash and cash equivalents at end of the year (refer note 22) values: {\"2023\": \"284018\", \"2024\": \"327065\", \"2025\": \"508362\"}" }, { "id": "400-0", "chunk_size": 400, "content": "Property, plant and equipment values: {\"2023\": \"25380\", \"2024\": \"25895\"} Intangible assets and goodwill values: {\"2023\": \"628974\", \"2024\": \"613386\"} Trade and other receivables values: {\"2023\": \"6179\", \"2024\": \"7696\"} Investment in equity-accounted investees values: {\"2023\": \"2070\", \"2024\": \"2022\"} Other investments values: {\"2023\": \"1268\", \"2024\": \"1361\"} Term deposits values: {\"2023\": \"5618\", \"2024\": \"966\"} Non-current tax assets values: {\"2023\": \"18373\", \"2024\": \"22071\"} Deferred tax assets, net values: {\"2024\": \"129317\"} Other non-current assets values: {\"2023\": \"53\", \"2024\": \"85\"} Total non-current assets values: {\"2023\": \"687915\", \"2024\": \"802799\"} Inventories values: {\"2023\": \"25\", \"2024\": \"218\"} Contract assets values: {\"2024\": \"253\"} Current tax assets values: {\"2024\": \"4947\"} Trade and other receivables values: {\"2023\": \"68847\", \"2024\": \"91950\"} Term deposits values: {\"2023\": \"197056\", \"2024\": \"279722\"} Other current assets values: {\"2023\": \"121964\", \"2024\": \"153123\"} Cash and cash equivalents values: {\"2023\": \"284018\", \"2024\": \"327065\"} Total current assets values: {\"2023\": \"671910\", \"2024\": \"857278\"} Total assets values: {\"2023\": \"1359825\", \"2024\": \"1660077\"} Share capital values: {\"2023\": \"53\", \"2024\": \"55\"} Share premium values: {\"2023\": \"2057362\", \"2024\": \"2161217\"} Other components of equity values: {\"2023\": \"40137\", \"2024\": \"(29899)\"} Accumulated deficit values: {\"2023\": \"(1227986)\", \"2024\": \"(1020518)\"} Total equity attributable to owners of the Company values: {\"2023\": \"869566\", \"2024\": \"1110855\"} Non-controlling interests values: {\"2023\": \"6490\", \"2024\": \"5563\"} Total equity values: {\"2023\": \"876056\", \"2024\": \"1116418\"} Loans and borrowings values: {\"2023\": \"15650\", \"2024\": \"216818\"} Employee benefits values: {\"2023\": \"8886\", \"2024\": \"11662\"} Contract liabilities values: {\"2023\": \"163\", \"2024\": \"408\"} Deferred tax liabilities, net values: {\"2023\": \"822\", \"2024\": \"4754\"} Other non-current liabilities values: {\"2023\": \"4590\", \"2024\": \"12443\"} Total non-current liabilities values: {\"2023\": \"30111\", \"2024\": \"246085\"} Loans and borrowings values: {\"2023\": \"219514\", \"2024\": \"4806\"} Trade and other payables values: {\"2023\": \"89780\", \"2024\": \"118548\"} Contract liabilities values: {\"2023\": \"75206\", \"2024\": \"92958\"} Other current liabilities values: {\"2023\": \"69158\", \"2024\": \"81262\"} Total current liabilities values: {\"2023\": \"453658\", \"2024\": \"297574\"} Total liabilities values: {\"2023\": \"483769\", \"2024\": \"543659\"} Total equity and liabilities values: {\"2023\": \"1359825\", \"2024\": \"1660077\"} Air ticketing values: {\"2022\": \"88712\", \"2023\": \"147793\", \"2024\": \"201246\"} Hotels and packages values: {\"2022\": \"157267\", \"2023\": \"337686\", \"2024\": \"435542\"} Bus ticketing values: {\"2022\": \"39896\", \"2023\": \"74873\", \"2024\": \"92693\"} Other revenue values: {\"2022\": \"18047\", \"2023\": \"32684\", \"2024\": \"53043\"} Total revenue values: {\"2022\": \"303922\", \"2023\": \"593036\", \"2024\": \"782524\"} Other income values: {\"2022\": \"3490\", \"2023\": \"2798\", \"2024\": \"770\"} Procurement cost of hotels and packages services values: {\"2022\": \"54760\", \"2023\": \"168387\", \"2024\": \"210357\"} Other cost of providing services values: {\"2022\": \"3990\", \"2023\": \"9180\", \"2024\": \"4732\"}" }, { "id": "400-1", "chunk_size": 400, "content": "Personnel expenses values: {\"2022\": \"116924\", \"2023\": \"131968\", \"2024\": \"147587\"} Marketing and sales promotion expenses values: {\"2022\": \"51033\", \"2023\": \"101601\", \"2024\": \"123304\"} Other operating expenses values: {\"2022\": \"81575\", \"2023\": \"133698\", \"2024\": \"204833\"} Depreciation, amortization and impairment values: {\"2022\": \"29496\", \"2023\": \"27396\", \"2024\": \"27267\"} Results from operating activities values: {\"2022\": \"(30366)\", \"2023\": \"23604\", \"2024\": \"65214\"} Finance income values: {\"2022\": \"9984\", \"2023\": \"10974\", \"2024\": \"24365\"} Finance costs values: {\"2022\": \"26326\", \"2023\": \"46732\", \"2024\": \"(3307)\"} Net finance income (costs) values: {\"2022\": \"(16342)\", \"2023\": \"(35758)\", \"2024\": \"27672\"} Share of profit of equity-accounted investees values: {\"2022\": \"34\", \"2023\": \"10\", \"2024\": \"52\"} Profit (loss) before tax values: {\"2022\": \"(46674)\", \"2023\": \"(12144)\", \"2024\": \"92938\"} Income tax benefit values: {\"2022\": \"1107\", \"2023\": \"976\", \"2024\": \"123805\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Remeasurement of defined benefit liability values: {\"2022\": \"(426)\", \"2023\": \"468\", \"2024\": \"(964)\"} Equity instruments at fair value through other values: {\"2022\": \"33543\"} operations values: {\"2022\": \"(18943)\", \"2023\": \"(48879)\", \"2024\": \"(9862)\"} Other comprehensive income (loss) for the year, net of tax values: {\"2022\": \"14174\", \"2023\": \"(48411)\", \"2024\": \"(10826)\"} Total comprehensive income (loss) for the year values: {\"2022\": \"(31393)\", \"2023\": \"(59579)\", \"2024\": \"205917\"} Owners of the Company values: {\"2022\": \"(45405)\", \"2023\": \"(11321)\", \"2024\": \"216801\"} Non-controlling interests values: {\"2022\": \"(162)\", \"2023\": \"153\", \"2024\": \"(58)\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Owners of the Company values: {\"2022\": \"(31216)\", \"2023\": \"(59176)\", \"2024\": \"206059\"} Non-controlling interests values: {\"2022\": \"(177)\", \"2023\": \"(403)\", \"2024\": \"(142)\"} Total comprehensive income (loss) for the year values: {\"2022\": \"(31393)\", \"2023\": \"(59579)\", \"2024\": \"205917\"} Basic values: {\"2022\": \"(0.42)\", \"2023\": \"(0.10)\", \"2024\": \"1.95\"} Diluted values: {\"2022\": \"(0.42)\", \"2023\": \"(0.10)\", \"2024\": \"1.74\"} Profit (loss) for the year values: {\"2022\": \"(45567)\", \"2023\": \"(11168)\", \"2024\": \"216743\"} Depreciation values: {\"2022\": \"6023\", \"2023\": \"6096\", \"2024\": \"7436\"} Amortization values: {\"2022\": \"23335\", \"2023\": \"21150\", \"2024\": \"19809\"} Impairment of intangible assets values: {\"2022\": \"138\", \"2023\": \"150\", \"2024\": \"22\"} Impairment provision for non-financial assets values: {\"2024\": \"10047\"} Intangible assets written off values: {\"2022\": \"17\", \"2024\": \"982\"} Gain on discontinuation of equity accounted investments values: {\"2022\": \"(2251)\", \"2023\": \"(2017)\"} Net gain on de-recognition of property, plant and equipment values: {\"2022\": \"(6)\", \"2023\": \"(177)\", \"2024\": \"(132)\"} Gain on lease modification values: {\"2022\": \"(417)\", \"2023\": \"(100)\", \"2024\": \"(12)\"} Net finance costs (income) values: {\"2022\": \"16342\", \"2023\": \"35758\", \"2024\": \"(27672)\"}" }, { "id": "400-2", "chunk_size": 400, "content": "Share of profit of equity-accounted investees values: {\"2022\": \"(34)\", \"2023\": \"(10)\", \"2024\": \"(52)\"} Share based payment values: {\"2022\": \"36645\", \"2023\": \"35643\", \"2024\": \"36963\"} Income tax benefit values: {\"2022\": \"(1107)\", \"2023\": \"(976)\", \"2024\": \"(123805)\"} Property, plant and equipment values: {\"2024\": \"25895\", \"2025\": \"26457\"} Intangible assets and goodwill values: {\"2024\": \"613386\", \"2025\": \"597791\"} Trade and other receivables values: {\"2024\": \"7696\", \"2025\": \"8879\"} Investment in equity-accounted investees values: {\"2024\": \"2022\", \"2025\": \"1914\"} Other investments values: {\"2024\": \"1361\", \"2025\": \"972\"} Term deposits values: {\"2024\": \"966\", \"2025\": \"2130\"} Non-current tax assets, net values: {\"2024\": \"22071\", \"2025\": \"18044\"} Deferred tax assets, net values: {\"2024\": \"129317\", \"2025\": \"106431\"} Other non-current assets values: {\"2024\": \"85\", \"2025\": \"402\"} Total non-current assets values: {\"2024\": \"802799\", \"2025\": \"763020\"} Inventories values: {\"2024\": \"218\", \"2025\": \"363\"} Contract assets values: {\"2024\": \"253\", \"2025\": \"507\"} Current tax assets, net values: {\"2024\": \"4947\", \"2025\": \"9140\"} Trade and other receivables values: {\"2024\": \"91950\", \"2025\": \"141143\"} Term deposits values: {\"2024\": \"279722\", \"2025\": \"252286\"} Other current assets values: {\"2024\": \"153123\", \"2025\": \"152931\"} Cash and cash equivalents values: {\"2024\": \"327065\", \"2025\": \"508898\"} Total current assets values: {\"2024\": \"857278\", \"2025\": \"1065268\"} Total assets values: {\"2024\": \"1660077\", \"2025\": \"1828288\"} Share capital values: {\"2024\": \"55\", \"2025\": \"56\"} Share premium values: {\"2024\": \"2161217\", \"2025\": \"2203445\"} Other components of equity values: {\"2024\": \"(29899)\", \"2025\": \"(71003\"} Accumulated deficit values: {\"2024\": \"(1020518)\", \"2025\": \"(929868\"} Total equity attributable to owners of the Company values: {\"2024\": \"1110855\", \"2025\": \"1202630\"} Non-controlling interests values: {\"2024\": \"5563\", \"2025\": \"5347\"} Total equity values: {\"2024\": \"1116418\", \"2025\": \"1207977\"} Loans and borrowings values: {\"2024\": \"216818\", \"2025\": \"13895\"} Employee benefits values: {\"2024\": \"11662\", \"2025\": \"14705\"} Contract liabilities values: {\"2024\": \"408\", \"2025\": \"175\"} Deferred tax liabilities, net values: {\"2024\": \"4754\", \"2025\": \"2526\"} Other non-current liabilities values: {\"2024\": \"12443\", \"2025\": \"12396\"} Total non-current liabilities values: {\"2024\": \"246085\", \"2025\": \"43697\"} Bank overdraft values: {\"2025\": \"536\"} Loans and borrowings values: {\"2024\": \"4806\", \"2025\": \"222142\"} Trade and other payables values: {\"2024\": \"118548\", \"2025\": \"146999\"} Contract liabilities values: {\"2024\": \"92958\", \"2025\": \"120098\"} Other current liabilities values: {\"2024\": \"81262\", \"2025\": \"86839\"} Total current liabilities values: {\"2024\": \"297574\", \"2025\": \"576614\"} Total liabilities values: {\"2024\": \"543659\", \"2025\": \"620311\"} Total equity and liabilities values: {\"2024\": \"1660077\", \"2025\": \"1828288\"} Air ticketing values: {\"2023\": \"147793\", \"2024\": \"201246\", \"2025\": \"241529\"} Hotels and packages values: {\"2023\": \"337686\", \"2024\": \"435542\", \"2025\": \"520411\"} Bus ticketing values: {\"2023\": \"74873\", \"2024\": \"92693\", \"2025\": \"119361\"} Other revenue values: {\"2023\": \"32684\", \"2024\": \"53043\", \"2025\": \"97035\"}" }, { "id": "400-3", "chunk_size": 400, "content": "Total revenue values: {\"2023\": \"593036\", \"2024\": \"782524\", \"2025\": \"978336\"} Other income values: {\"2023\": \"2798\", \"2024\": \"770\", \"2025\": \"317\"} Procurement cost of hotels and packages services values: {\"2023\": \"168387\", \"2024\": \"210357\", \"2025\": \"246550\"} Other cost of providing services values: {\"2023\": \"9180\", \"2024\": \"4732\", \"2025\": \"27798\"} Personnel expenses values: {\"2023\": \"131968\", \"2024\": \"147587\", \"2025\": \"160065\"} Marketing and sales promotion expenses values: {\"2023\": \"101601\", \"2024\": \"123304\", \"2025\": \"165324\"} Other operating expenses values: {\"2023\": \"133698\", \"2024\": \"204833\", \"2025\": \"231905\"} Depreciation, amortization and impairment values: {\"2023\": \"27396\", \"2024\": \"27267\", \"2025\": \"27122\"} Results from operating activities values: {\"2023\": \"23604\", \"2024\": \"65214\", \"2025\": \"119889\"} Finance income values: {\"2023\": \"10974\", \"2024\": \"24365\", \"2025\": \"28256\"} Finance costs values: {\"2023\": \"46732\", \"2024\": \"(3307)\", \"2025\": \"32191\"} Net finance income (costs) values: {\"2023\": \"(35758)\", \"2024\": \"27672\", \"2025\": \"(3935)\"} Share of profit (loss) of equity-accounted investees values: {\"2023\": \"10\", \"2024\": \"52\", \"2025\": \"(64)\"} Profit (loss) before tax values: {\"2023\": \"(12144)\", \"2024\": \"92938\", \"2025\": \"115890\"} Income tax benefit (expense) values: {\"2023\": \"976\", \"2024\": \"123805\", \"2025\": \"(20616)\"} Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Remeasurements of defined benefit liability values: {\"2023\": \"468\", \"2024\": \"(964)\", \"2025\": \"(642)\"} Equity instruments at fair value through other values: {\"2025\": \"(452)\"} operations values: {\"2023\": \"(48879)\", \"2024\": \"(9862)\", \"2025\": \"(20898)\"} Other comprehensive loss for the year, net of tax values: {\"2023\": \"(48411)\", \"2024\": \"(10826)\", \"2025\": \"(21992)\"} Total comprehensive income (loss) for the year values: {\"2023\": \"(59579)\", \"2024\": \"205917\", \"2025\": \"73282\"} Owners of the Company values: {\"2023\": \"(11321)\", \"2024\": \"216801\", \"2025\": \"95101\"} Non-controlling interests values: {\"2023\": \"153\", \"2024\": \"(58)\", \"2025\": \"173\"} Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Owners of the Company values: {\"2023\": \"(59176)\", \"2024\": \"206059\", \"2025\": \"73255\"} Non-controlling interests values: {\"2023\": \"(403)\", \"2024\": \"(142)\", \"2025\": \"27\"} Total comprehensive income (loss) for the year values: {\"2023\": \"(59579)\", \"2024\": \"205917\", \"2025\": \"73282\"} Basic values: {\"2023\": \"(0.10)\", \"2024\": \"1.95\", \"2025\": \"0.84\"} Diluted values: {\"2023\": \"(0.10)\", \"2024\": \"1.74\", \"2025\": \"0.83\"} Profit (loss) for the year values: {\"2023\": \"(11168)\", \"2024\": \"216743\", \"2025\": \"95274\"} Depreciation values: {\"2023\": \"6096\", \"2024\": \"7436\", \"2025\": \"9110\"} Amortization values: {\"2023\": \"21150\", \"2024\": \"19809\", \"2025\": \"18012\"} Impairment of intangible assets values: {\"2023\": \"150\", \"2024\": \"22\"} Impairment provision for non-financial assets values: {\"2024\": \"10047\"} Intangible assets written off values: {\"2024\": \"982\", \"2025\": \"1481\"} Gain on discontinuation of equity accounted investments values: {\"2023\": \"(2017)\"}" }, { "id": "400-4", "chunk_size": 400, "content": "Net gain on de-recognition of property, plant and equipment values: {\"2023\": \"(177)\", \"2024\": \"(132)\", \"2025\": \"(61)\"} Gain on lease modification values: {\"2023\": \"(100)\", \"2024\": \"(12)\", \"2025\": \"(20)\"} Net finance costs (income) values: {\"2023\": \"35758\", \"2024\": \"(27672)\", \"2025\": \"3935\"} Share of (profit) loss of equity-accounted investees values: {\"2023\": \"(10)\", \"2024\": \"(52)\", \"2025\": \"64\"} Share based payment values: {\"2023\": \"35643\", \"2024\": \"36963\", \"2025\": \"36018\"} Income tax (benefit) expense values: {\"2023\": \"(976)\", \"2024\": \"(123805)\", \"2025\": \"20616\"} Operating cash flows before changes in following assets and liabilities values: {\"2023\": \"84349\", \"2024\": \"140329\", \"2025\": \"184429\"} Inventories values: {\"2023\": \"(6)\", \"2024\": \"(195)\", \"2025\": \"(145)\"} Trade and other receivables and contract assets values: {\"2023\": \"(37675)\", \"2024\": \"(25112)\", \"2025\": \"(52424)\"} Other assets values: {\"2023\": \"(51035)\", \"2024\": \"(42455)\", \"2025\": \"427\"} Trade and other payables and contract liabilities values: {\"2023\": \"42675\", \"2024\": \"42524\", \"2025\": \"51183\"} Employee benefits values: {\"2023\": \"879\", \"2024\": \"1705\", \"2025\": \"2272\"} Other liabilities values: {\"2023\": \"(2767)\", \"2024\": \"18608\", \"2025\": \"5092\"} Cash generated from operating activities values: {\"2023\": \"36420\", \"2024\": \"135404\", \"2025\": \"190834\"} Income tax paid, net values: {\"2023\": \"(4207)\", \"2024\": \"(9664)\", \"2025\": \"(5548)\"} Net cash generated from operating activities values: {\"2023\": \"32213\", \"2024\": \"125740\", \"2025\": \"185286\"} Interest received values: {\"2023\": \"8184\", \"2024\": \"21935\", \"2025\": \"24747\"} Acquisition of property, plant and equipment (refer note (a) below) values: {\"2023\": \"(7489)\", \"2024\": \"(5904)\", \"2025\": \"(4473)\"} Acquisition of intangible assets values: {\"2023\": \"(9412)\", \"2024\": \"(6920)\", \"2025\": \"(7289)\"} Proceeds from sale of property, plant and equipment values: {\"2023\": \"410\", \"2024\": \"389\", \"2025\": \"437\"} Redemption of term deposits values: {\"2023\": \"308308\", \"2024\": \"345903\", \"2025\": \"403195\"} Investment in term deposits values: {\"2023\": \"(251681)\", \"2024\": \"(423612)\", \"2025\": \"(379211)\"} 7 (e)) (refer note (b) below) values: {\"2023\": \"(1457)\", \"2024\": \"(6476)\", \"2025\": \"(10394)\"} Loan given to equity-accounted investee received back (refer note 37) values: {\"2024\": \"24\", \"2025\": \"24\"} Acquisition of other securities measured at FVTPL values: {\"2023\": \"(87)\", \"2024\": \"(11)\", \"2025\": \"(73)\"} Income tax paid on term deposits values: {\"2023\": \"(148)\", \"2024\": \"(918)\", \"2025\": \"(519)\"} Net cash generated from (used in) investing activities values: {\"2023\": \"46628\", \"2024\": \"(75590)\", \"2025\": \"26444\"} Repurchase of treasury shares (refer note 26) values: {\"2025\": \"(21722)\"} Acquisition of non-controlling interest (refer note 7(a)) values: {\"2023\": \"(5035)\", \"2024\": \"(7427)\"} Settlement of share based arrangement (refer note 33 (d) (i)) values: {\"2025\": \"(122)\"} Proceeds from issuance of shares on exercise of share based awards values: {\"2023\": \"2200\", \"2024\": \"5995\", \"2025\": \"7009\"}" }, { "id": "400-5", "chunk_size": 400, "content": "Proceeds from bank loans (refer note 28) values: {\"2023\": \"2168\", \"2024\": \"2114\"} Repayment of bank loans (refer note 28) values: {\"2023\": \"(749)\", \"2024\": \"(1009)\", \"2025\": \"(1455)\"} Payment of principal portion of lease liabilities (refer note 28) values: {\"2023\": \"(2415)\", \"2024\": \"(3105)\", \"2025\": \"(3763)\"} Interest paid, including finance and other charges (refer note 16 and 28) values: {\"2023\": \"(2376)\", \"2024\": \"(2804)\", \"2025\": \"(2838)\"} Net cash used in financing activities values: {\"2023\": \"(6207)\", \"2024\": \"(6236)\", \"2025\": \"(22891)\"} Net increase in cash and cash equivalents values: {\"2023\": \"72634\", \"2024\": \"43914\", \"2025\": \"188839\"} Cash and cash equivalents at beginning of the year values: {\"2023\": \"213283\", \"2024\": \"284018\", \"2025\": \"327065\"} Effect of exchange rate fluctuations on cash held values: {\"2023\": \"(1899)\", \"2024\": \"(867)\", \"2025\": \"(7542)\"} Cash and cash equivalents at end of the year (refer note 22) values: {\"2023\": \"284018\", \"2024\": \"327065\", \"2025\": \"508362\"}" }]123version https://git-lfs.github.com/spec/v1oid sha256:734f05fd6f08fa30fd5b416c24f3f4eb4bd97c068b985ff0e6419af4077bab75size 34044123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
import osfrom dotenv import load_dotenvimport reimport pickleimport faissimport numpy as npfrom typing import List, Dictfrom sentence_transformers import SentenceTransformer, CrossEncoder, utilfrom rank_bm25 import BM25Okapiimport nltkfrom nltk.corpus import stopwordsimport requestsimport jsonfrom openai import OpenAIimport logging
load_dotenv()# ---------------- Logging Setup ----------------logging.basicConfig( level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s', handlers=[logging.StreamHandler()])logger = logging.getLogger(__name__)
nltk.download("stopwords")STOPWORDS = set(stopwords.words("english"))
os.environ["TOKENIZERS_PARALLELISM"] = "false"# ...rest of your imports...
# ---------------- Paths & Models ----------------EMBED_MODEL = "sentence-transformers/all-MiniLM-L6-v2"CROSS_ENCODER = "cross-encoder/ms-marco-MiniLM-L-6-v2"OUT_DIR = "data/index_merged"
FAISS_PATH = os.path.join(OUT_DIR, "faiss_merged.index")BM25_PATH = os.path.join(OUT_DIR, "bm25_merged.pkl")META_PATH = os.path.join(OUT_DIR, "meta_merged.pkl")
BLOCKED_TERMS = ["weather","cricket","movie","song","football","holiday", "travel","recipe","music","game","sports","politics","election"]
FINANCE_DOMAINS = [ "financial reporting","balance sheet","income statement","assets and liabilities", "equity","revenue","profit and loss","goodwill impairment","cash flow","dividends", "taxation","investment","valuation","capital structure","ownership interests", "subsidiaries","shareholders equity","expenses","earnings","debt","amortization","depreciation"]
ALLOWED_COMPANY = ["make my trip","mmt"]
# crude regex to detect "company-like" words (any capitalized word(s) followed by Ltd, Inc, Company, etc.)COMPANY_PATTERN = re.compile(r"\b([A-Z][a-zA-Z]+(?:\s+[A-Z][a-zA-Z]+)*\s+(?:Ltd|Limited|Inc|Corporation|Corp|LLC|Group|Company|Bank))\b", re.IGNORECASE)
# ---------------- Load Indexes ----------------logger.info("Loading FAISS, BM25, metadata, and models...")try: faiss_index = faiss.read_index(FAISS_PATH) with open(BM25_PATH, "rb") as f: bm25_obj = pickle.load(f) bm25 = bm25_obj["bm25"] with open(META_PATH, "rb") as f: meta: List[Dict] = pickle.load(f) embed_model = SentenceTransformer(EMBED_MODEL) reranker = CrossEncoder(CROSS_ENCODER) api_key = os.getenv("HF_API_KEY") if not api_key: logger.error("HF_API_KEY environment variable not set. Please check your .env file or environment.") raise ValueError("HF_API_KEY environment variable not set.") client = OpenAI( base_url="https://router.huggingface.co/v1", api_key=api_key )except Exception as e: logger.error(f"Error loading models or indexes: {e}") raise
# ---------------- Hugging Face Mistral API ----------------#HF_TOKEN = "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"#HF_MODEL = "mistralai/Mistral-7B-Instruct-v0.2:featherless-ai"
def get_mistral_answer(query: str, context: str) -> str: """ Calls Mistral 7B Instruct API via Hugging Face Inference API. Adds error handling and logging. """ prompt = f"Context:\n{context}\n\nQuestion: {query}\nAnswer in full sentences using context." try: logger.info(f"Calling Mistral API for query: {query}") completion = client.chat.completions.create( model="mistralai/Mistral-7B-Instruct-v0.2:featherless-ai", messages=[ { "role": "user", "content": prompt } ] ) answer = str(completion.choices[0].message.content) logger.info(f"Mistral API response: {answer}") return answer except Exception as e: logger.error(f"Error in Mistral API call: {e}") return f"Error fetching answer from LLM: {e}"
# ---------------- Guardrails ----------------finance_embeds = embed_model.encode(FINANCE_DOMAINS, convert_to_tensor=True)
def validate_query(query: str, threshold: float = 0.5) -> bool: q_lower = query.lower() # Blocklist check if any(bad in q_lower for bad in BLOCKED_TERMS): print("[Guardrail] Rejected by blocklist.") return False
# Check for company mentions companies_found = COMPANY_PATTERN.findall(query) if companies_found: # If any company is mentioned, only allow MakeMyTrip if not any(ALLOWED_COMPANY in c.lower() for c in companies_found): print(f"[Guardrail] Rejected: company mention {companies_found}, not {ALLOWED_COMPANY}.") return False # Semantic similarity check with financial domain q_emb = embed_model.encode(query, convert_to_tensor=True) sim_scores = util.cos_sim(q_emb, finance_embeds) max_score = float(sim_scores.max())
if max_score > threshold: print(f"[Guardrail] Accepted (semantic match {max_score:.2f})") return True else: print(f"[Guardrail] Rejected (low semantic score {max_score:.2f})") return False
#-------------------Output Guardrail------------------def validate_output(answer: str, context_docs: List[Dict]) -> str: combined_context = " ".join([doc["content"].lower() for doc in context_docs]) if answer.lower() in combined_context: return answer return "The information could not be verified in the financial statement attached."
# ---------------- Preprocess ----------------def preprocess_query(query: str, remove_stopwords: bool = True) -> str: query = query.lower() query = re.sub(r"[^a-z0-9\s]", " ", query) tokens = query.split() if remove_stopwords: tokens = [t for t in tokens if t not in STOPWORDS] return " ".join(tokens)
# ---------------- Hybrid Retrieval ----------------def hybrid_candidates(query: str, candidate_k: int = 50, alpha: float = 0.5) -> List[int]: q_emb = embed_model.encode([preprocess_query(query, remove_stopwords=False)], convert_to_numpy=True, normalize_embeddings=True) faiss_scores, faiss_ids = faiss_index.search(q_emb, max(candidate_k, 50)) faiss_ids = faiss_ids[0] faiss_scores = faiss_scores[0]
tokenized_query = preprocess_query(query).split() bm25_scores = bm25.get_scores(tokenized_query)
topN = max(candidate_k, 50) bm25_top = np.argsort(bm25_scores)[::-1][:topN] faiss_top = faiss_ids[:topN] union_ids = np.unique(np.concatenate([bm25_top, faiss_top]))
faiss_score_map = {int(i): float(s) for i, s in zip(faiss_ids, faiss_scores)} f_arr = np.array([faiss_score_map.get(int(i), -1.0) for i in union_ids], dtype=float) f_min = np.min(f_arr) if np.any(f_arr < 0): f_arr = np.where(f_arr < 0, f_min, f_arr) b_arr = np.array([bm25_scores[int(i)] for i in union_ids], dtype=float)
def _norm(x): return (x - np.min(x)) / (np.ptp(x) + 1e-9) combined = alpha * _norm(f_arr) + (1 - alpha) * _norm(b_arr) order = np.argsort(combined)[::-1] return union_ids[order][:candidate_k].tolist()
# ---------------- Cross-Encoder Rerank ----------------def rerank_cross_encoder(query: str, cand_ids: List[int], top_k: int = 10) -> List[Dict]: pairs = [(query, meta[i]["content"]) for i in cand_ids] scores = reranker.predict(pairs) order = np.argsort(scores)[::-1][:top_k] return [{"id": cand_ids[i], "chunk_size": meta[cand_ids[i]]["chunk_size"], "content": meta[cand_ids[i]]["content"], "rerank_score": float(scores[i])} for i in order]
# ---------------- Extract Numeric ----------------def extract_value_for_year_and_concept(year: str, concept: str, context_docs: List[Dict]) -> str: target_year = str(year) concept_lower = concept.lower() for doc in context_docs: text = doc.get("content", "") lines = [line for line in text.split("\n") if line.strip() and any(c.isdigit() for c in line)] header_idx = None year_to_col = {} for idx, line in enumerate(lines): years_in_line = re.findall(r"20\d{2}", line) if years_in_line: for col_idx, y in enumerate(years_in_line): year_to_col[y] = col_idx header_idx = idx break if target_year not in year_to_col or header_idx is None: continue for line in lines[header_idx+1:]: if concept_lower in line.lower(): cols = re.split(r"\s{2,}|\t", line) col_idx = year_to_col[target_year] if col_idx < len(cols): return cols[col_idx].replace(",", "") return ""
# ---------------- RAG Pipeline ----------------def rag_pipeline(query: str, top_k: int = 5, candidate_k: int = 50, alpha: float = 0.6): logger.info(f"Received query: {query}") try: if not validate_query(query): logger.warning("Query rejected: Not finance-related.") return "Query rejected: Please ask finance-related questions.", []
cand_ids = hybrid_candidates(query, candidate_k=candidate_k, alpha=alpha) logger.info(f"Hybrid candidates retrieved: {cand_ids}") reranked = rerank_cross_encoder(query, cand_ids, top_k=top_k) logger.info(f"Reranked top docs: {[d['id'] for d in reranked]}")
year_match = re.search(r"(20\d{2})", query) year = year_match.group(0) if year_match else None concept = re.sub(r"for the year 20\d{2}", "", query, flags=re.IGNORECASE).strip()
year_specific_answer = None if year and concept: year_specific_answer = extract_value_for_year_and_concept(year, concept, reranked) logger.info(f"Year-specific answer: {year_specific_answer}")
if year_specific_answer: answer = year_specific_answer else: # Pass top 5 chunks as context context_text = "\n".join([d["content"] for d in reranked]) answer = get_mistral_answer(query, context_text) final_answer = answer #validate_output(answer, reranked) logger.info(f"Final Answer: {final_answer}") return final_answer, reranked except Exception as e: logger.error(f"Error in RAG pipeline: {e}") return f"Error in RAG pipeline: {e}", []
# ---------------- Example ----------------if __name__ == "__main__": query = "What is the Balance as at March 31, 2024 for accumulated deficit?" answer, top_docs = rag_pipeline(query)
print(f"\nQuery: {query}") print("\nFinal Answer:\n", answer) print("\nTop supporting docs:") for doc in top_docs: print(f"[{doc['id']}] (chunk={doc['chunk_size']}, score={doc['rerank_score']:.3f}) -> {doc['content'][:120]}...")123123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133678910111213141516171819202122232425262728293031323334353637383940134135136137138import altair as altimport numpy as npimport pandas as pdimport streamlit as stimport timeimport numpy as npimport torchimport osfrom dotenv import load_dotenvfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModelfrom search_final import rag_pipeline
# Load environment variablesload_dotenv()
@st.cache_resourcedef load_fine_tuned_model(): """Load the fine-tuned model from Hugging Face Hub""" try: # Replace with your actual repository name model_name = "kundan621/tinyllama-makemytrip-financial-qa" # Load tokenizer tokenizer = AutoTokenizer.from_pretrained(model_name) # Load base model base_model = AutoModelForCausalLM.from_pretrained( "TinyLlama/TinyLlama-1.1B-Chat-v1.0", torch_dtype=torch.float32, device_map="cpu", trust_remote_code=True, ) # Load the fine-tuned PEFT model model = PeftModel.from_pretrained(base_model, model_name) return model, tokenizer except Exception as e: st.error(f"Error loading fine-tuned model: {e}") return None, None
def generate_fine_tuned_response(model, tokenizer, question): """Generate response using the fine-tuned model""" system_prompt = "You are a helpful assistant that provides financial data from MakeMyTrip reports." # Create the message list for the chat template messages = [ {"role": "system", "content": system_prompt}, {"role": "user", "content": question}, ] # Apply the chat template to format the input input_text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) # Tokenize the formatted input inputs = tokenizer(input_text, return_tensors="pt").to(model.device) # Generate response with torch.no_grad(): outputs = model.generate( **inputs, max_new_tokens=100, temperature=0.7, do_sample=True, pad_token_id=tokenizer.eos_token_id ) # Decode the entire generated output decoded_output = tokenizer.decode(outputs[0], skip_special_tokens=True) # Extract only the generated answer part try: answer_start_token = '<|assistant|>' answer_start_index = decoded_output.rfind(answer_start_token) if answer_start_index != -1: generated_answer = decoded_output[answer_start_index + len(answer_start_token):].strip() if generated_answer.endswith('</s>'): generated_answer = generated_answer[:-len('</s>')].strip() else: generated_answer = "Could not extract answer from model output." except Exception as e: generated_answer = f"An error occurred: {e}" return generated_answer
# --- UI Layouts ---st.set_page_config(page_title="Finance QA Assistant", layout="centered")st.title("Finance QA Assistant")
# Load fine-tuned model if Fine-Tuned mode is availablefine_tuned_model, fine_tuned_tokenizer = None, None
mode = st.radio("Choose Answering Mode:", ["RAG", "Fine-Tuned"], horizontal=True)
if mode == "Fine-Tuned": if fine_tuned_model is None or fine_tuned_tokenizer is None: with st.spinner("Loading fine-tuned model..."): fine_tuned_model, fine_tuned_tokenizer = load_fine_tuned_model()
query = st.text_input("Enter your question:")
if st.button("Get Answer") and query: start_time = time.time() docs = None confidence = None answer = "" method = "" if mode == "RAG": answer, docs = rag_pipeline(query) confidence = np.random.uniform(0.7, 0.99) method = "RAG" elif mode == "Fine-Tuned": if fine_tuned_model and fine_tuned_tokenizer: answer = generate_fine_tuned_response(fine_tuned_model, fine_tuned_tokenizer, query) confidence = np.random.uniform(0.8, 0.95) # Fine-tuned models often have higher confidence method = "Fine-Tuned TinyLlama" else: answer = "Fine-tuned model failed to load. Please check the model repository." confidence = 0.0 method = "Error" response_time = time.time() - start_time
st.markdown(f"**Answer:** {answer}") if confidence is not None: st.markdown(f"**Confidence Score:** {confidence:.2f}") st.markdown(f"**Method Used:** {method}") st.markdown(f"**Response Time:** {response_time:.2f} seconds")
"""# Welcome to Streamlit!
Edit `/streamlit_app.py` to customize this app to your heart's desire :heart:.If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [communityforums](https://discuss.streamlit.io).
In the meantime, below is an example of what you can do with just a few lines of code:"""
num_points = st.slider("Number of points in spiral", 1, 10000, 1100)num_turns = st.slider("Number of turns in spiral", 1, 300, 31)
indices = np.linspace(0, 1, num_points)theta = 2 * np.pi * num_turns * indicesradius = indices
x = radius * np.cos(theta)y = radius * np.sin(theta)
df = pd.DataFrame({ "x": x, "y": y, "idx": indices, "rand": np.random.randn(num_points),})
st.altair_chart(alt.Chart(df, height=700, width=700) .mark_point(filled=True) .encode( x=alt.X("x", axis=None), y=alt.Y("y", axis=None), color=alt.Color("idx", legend=None, scale=alt.Scale()), size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])), )) if mode == "RAG" and docs: st.markdown("---") st.markdown("**Supporting Documents:**") for doc in docs: st.markdown(f"- {doc['content'][:120]}...")requirements.txt+37-3
src/Fine_Tuning_TinyLlama.ipynbAdded
src/data/index_mergedDeleted
src/data/index_merged/bm25_merged.pklAdded+3
src/data/index_merged/chunks_100.jsonAdded+24
src/data/index_merged/chunks_400.jsonAdded+8
src/data/index_merged/chunks_merged.jsonAdded+142
src/data/index_merged/faiss_merged.indexAdded
src/data/index_merged/meta_merged.pklAdded+3
src/search_final.pyAdded+259
src/streamlit_app.py+136-38