My Llamaindex.TS chatbot can’t answer questions from all the embedded data

I created a llamaindex chatbot that can answer questions about recommend car by extracting relevant information from a file I provide.
The entire code of the chatbot file is as follows:

test_rag.js

const { OpenAI } = require("llamaindex");
const fs = require("fs").promises;
const {
    Document,
    VectorStoreIndex,
    QueryEngineTool,
    OpenAIAgent,
    Settings,
    storageContextFromDefaults,
    OpenAIEmbedding
} = require("llamaindex");
const readlineSync = require("readline-sync");
const path = require("path");

const dataPath = "data/car.json";
const errorLogFolder = "error_log";

async function main() {
    try {
        // Ensure error log directory exists
        await fs.mkdir(errorLogFolder, { recursive: true });

        // Setup OpenAI and callback events
        Settings.llm = new OpenAI({ model: "gpt-4o-mini" });
        Settings.callbackManager.on("llm-tool-call", (event) => {
            console.log("llm-tool-call :", event.detail.payload);
        });
        Settings.callbackManager.on("llm-tool-result", (event) => {
            console.log("llm-tool-result :", event.detail.payload);
        });

        // Read essay content from file
        const essay = await fs.readFile(dataPath, "utf-8");
        const document = new Document({ text: essay, id_: dataPath });

        const storageContext = await storageContextFromDefaults({
            persistDir: "./storage",
        });

        // Create vector index from the document
        const index = await VectorStoreIndex.fromDocuments([document], {
            storageContext,
        });

        // const secondStorageContext = await storageContextFromDefaults({
        //     persistDir: "./storage",
        // });

        // const loadedIndex = await VectorStoreIndex.init({
        //     storageContext: secondStorageContext,
        // });
        // Create query engine tool
        const individual_query_engine_tools = [
            new QueryEngineTool({
                queryEngine: index.asQueryEngine(),
                metadata: {
                    name: "vector_index",
                    description: ` you will recommend cars assembled in Thailand to user.
                    You will list the cars according to the requirements of the question and find out which car is best for this question.`,
                },
            }),
        ];

        // Initialize OpenAIAgent with tools
        const agent = new OpenAIAgent({
            tools: [...individual_query_engine_tools],
            verbose: true,
        });

        while (true) {
            const userInput = readlineSync.question("Enter your question (type 'exit' to quit): ");
            if (userInput.toLowerCase() === 'exit') {
                console.log("Exiting...");
                break;
            } else if (userInput.toLowerCase() !== '') {
                const response = await agent.chat({
                    message: userInput,
                });
                console.log('------------------------------------------------------');
                console.log("Response : ");
                console.log(response);
                console.log('------------------------------------------------------');
            }
        }
    } catch (error) {
        console.error("An error occurred:", error);

        // Generate a unique filename for the error log
        const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
        const errorLogPath = path.join(errorLogFolder, `error_log_${timestamp}.txt`);

        // Write the error details to the log file
        await fs.writeFile(errorLogPath, `Error: ${error.message}nStack: ${error.stack}`);
    }
}

main().catch(console.error);

And here is the data file where I stored all the car data in a .json file.

car.json

{
    "Gas Cars 2024": [{
            "Brand": "Nissan",
            "Model": "Almera ",
            "Color": "9 colornblack (black star) ,ngrey (gun metalic) ,ngrey (sky pearl) ,nwhite (strom white) ,nred (radiant red) ,nblue (night blue) ,nblack (black star) with black roof , nblack (black star) with black roof ,nblack (black star) with black roof ",
            "Body Type": "Sedan",
            "Segment ": "eco car",
            "Door": "4",
            "Seat": "4",
            "Year": 2024,
            "Price": "฿549,000 - ฿699,000",
            "Gear": "auto",
            "Drivetrain": "FWD",
            "Engine Type": "Inline 3 Cylinder 4 Valve DOHC.",
            "Powered by": "gasoline ",
            "Fuel type": "Benzene",
            "Fuel tank capacity (liters)": 35,
            "Consumption rate (fuel efficient)": "23.3 kilometers/liter",
            "Cylinder volume (cc)": "1000",
            "Horsepower": "100",
            "Safety System": "- Dual front SRS airbagsn- Side airbags (Side Airbags)n- Side Curtain Airbagsn- Anti-lock Braking System (ABS)n- Electronic Brake Force Distribution System (EBD)n- Brake Assist (BA) braking systemn- Immobilizer key systemn- Anti-theft alarmn- Central locking system control buttonn- ELR driver seat belt with retracting and automatic two-way tensioning (Double Pre-tensioner with Load Limiter)n- Front passenger seat belt ELR with pre-tensioner and automatic tension release (Single Pre-tensioner with Load Limiter)n- 3-point ELR rear seat belts, 3 positionsn- ISOFIX child seat mounting pointsn- Child protection system for opening rear doors from inside the vehiclen- Safety structure system Zone Body Conceptn- Third brake light",
            "Features": "- NISSANCONNECT SERVICESn-Tire Pressure Monitoring Sensor System (TPMS)n- High Beam Assist (HBA) automatic high beam on-off systemn- Warning system when the car leaves the lane Lane Departure Warning (LDW)n- Engine starting system from a remote key (Remote Engine Start)n- Black synthetic leather seatsn- Black cloth seats decorated with dark blue edges.n- Side mirrors the same color as the car electrically adjustablen- Intelligent Key - I-Keyn- Engine start button (Push Start Button)n- Dual front SRS airbagsn- Side Airbags and Side Curtain Airbagsn- Intelligent Forward Collision Warning (IFWC)n- Intelligent Emergency Braking (IEB) systemn- Control switch for automatic speed control (Cruise Control)n- Automatic air conditioning systemn- Side mirrors the same color as the car Electrically adjustable and foldable Automatically when locking the carn- 15"" alloy wheelsn- NISSANCONNECT SERVICESn- Intelligent Around View Monitor (IAVM)n- System for detecting and sending warning signals of moving objects and people from cameras around the car, Moving Object Detection (MOD)n- LED headlights with LED Signature Light and automatic headlight on-off system.n- Engine starting system from a remote key (Remote Engine Start)n- Wireless charging device"
        },
        {
            "Brand": "Nissan",
            "Model": "KICKSe-POWER",
            "Color": "12 colornblack (black star) ,nred (radiant red) ,norange (monarch orange) ,nsliver (brilliant sliver) ,nwhite (storm white) ,ngrey (gun meatllic) ,nblue (night blue) ,nred (radiant red) with black roof ,norange (monarch orange) with black roof ,nwhite (storm white) with black roof ,ngrey (gun meatllic) with black roof ,nblue (night blue) with black roof ",
            "Body Type": "SUV",
            "Segment ": "hybrid ",
            "Door": "5",
            "Seat": "5",
            "Year": 2024,
            "Price": "฿779900 - ฿939,900",
            "Gear": "auto",
            "Drivetrain": "4WD",
            "Engine Type": "1.2 liter 3-cylinder gasoline engine",
            "Powered by": "gasoline , electric",
            "Fuel type": "Benzene",
            "Fuel tank capacity (liters)": 41,
            "Consumption rate (fuel efficient)": "26.3 kilometers/liter",
            "Cylinder volume (cc)": "1200",
            "Horsepower": "82",
            "Safety System": "- Dual front SRS airbagsn- Side airbags (Side Airbags)n- Side Curtain Airbagsn- Anti-lock Braking System (ABS)n- Electronic Brake Force Distribution System (EBD)n- Brake Assist (BA) braking systemn- Immobilizer key systemn- Anti-theft alarmn- Central locking system control buttonn- ELR driver seat belt with retracting and automatic two-way tensioning (Double Pre-tensioner with Load Limiter)n- Front passenger seat belt ELR with pre-tensioner and automatic tension release (Single Pre-tensioner with Load Limiter)n- 3-point ELR rear seat belts, 3 positionsn- ISOFIX child seat mounting pointsn- Child protection system for opening rear doors from inside the vehiclen- Safety structure system Zone Body Conceptn- Third brake light",
            "Features": "- 6 airbags (Dual front SRS airbags, side airbags curtain airbag)n- Sporty leather-wrapped steering wheel decorated with sliver material, adjustable in 4 directions.n- Rear parking distance warningn- Technology to help warn you when you're tired while driving Driver Attention Alert (DAA)n- Intelligent Forward Collision Warning (IFCW) technology to warn before collisions.n- Intelligent Emergency Braking (IEB) technologyn- Automatic headlight on-off systemn- NissanConnect 8-inch touch screen with Apple CarPlay and Android auto connectivityn- Intelligent Around View Monitor (IAVM) technology that detects and sends warning signals about moving objects. Moving Object Detection (MOD)n- Intelligent Cruise Control (ICC) technologyn- Intelligent Rear View Mirror (IRVM) technologyn- Technology to detect objects behind the car while reversing, Rear Cross Traffic Alert (RCTA)n- Technology to warn when the car leaves the Lane Departure Warning (LDW) lane.n- High Beam Assist (HBA) automatic high beam on-off technologyn- Alloy wheels 17 x 6.5 J, gloss black"
        },
        {
            "Brand": "Nissan",
            "Model": "TERRA SPORT",
            "Color": "7 colornblack (black star) ,nwhite (white pearl) ,nred (Coulis Red) ,ngrey (stealth grey) ,",
            "Body Type": "SUV",
            "Segment ": "versatile",
            "Door": "5",
            "Seat": "7",
            "Year": 2024,
            "Price": "฿1,199,000 - ฿1,555,000",
            "Gear": "auto",
            "Drivetrain": "4WD",
            "Engine Type": "In-line 4-cylinder DOHC Twin Turbo Intercooler",
            "Powered by": "gasoline ",
            "Fuel type": "Diesel",
            "Fuel tank capacity (liters)": 78,
            "Consumption rate (fuel efficient)": "14.43 kilometers/liter",
            "Cylinder volume (cc)": "2300",
            "Horsepower": "190",
            "Safety System": "- ABS braking system with EBD and BAn- 6 airbags, front / side / and curtain airbagsn- B-LSD limited slip systemn- Vehicle Dynamic Control (VDC) automatic stability control technologyn- Rear window defogger wire paneln- Third brake light, LED typen- 1st row ELR seat belts, 3 points, 2 positions, adjustable. Equipped with an automatic pull-back and tension-relieving system. and a reminder system to fasten seat beltsn- 2nd row ELR seat belts, 3 points, 3 positionsn- 3rd row ELR seat belts, 3 points, 2 positionsn- ISOFIX child seat mounting pointsn- Intelligent key systemn- Immobilizer key system with anti-theft alarmn- Rear view cameran- 4 rear parking distance warning signsn- Zone Body safety structuren- Side impact beamsn- collapsible steering wheel When a frontal collision occursn- Automatic fuel valve cut-off system In the case of a car overturning",
            "Features": "- Quad-Eye LED headlights and Daytime lightsn- 8" touchscreen radio with Nissan Connect to connect to smartphonesn- The design allows the seat to be adjusted in many ways and the seat can be folded with just your fingertips with the Auto Tumble Seat.n- Smart TFT meter screen displays 7-inch 3D driving information with Off-Road Meter.n- 360 degree safety technology around the car (IFCW, IEB, LDW, IDA)n- 2.3 liter twin turbo diesel engine, 190 horsepower, with 7 speed automatic transmission - with manual mode"
        },
        {
            "Brand": "Nissan",
            "Model": "NAVARA PRO-4X / PRO-2X",
            "Color": "4 colorngrey (stealth grey) ,nblack (black star) , nwhite (white pearl) , nred (burning red)",
            "Body Type": "Pickup Truck",
            "Segment ": "versatile",
            "Door": "4",
            "Seat": "5",
            "Year": 2024,
            "Price": "฿1,030,000-฿1,160,000",
            "Gear": "auto",
            "Drivetrain": "RWD , 4WD",
            "Engine Type": "2.3-liter twin-turbo",
            "Powered by": "gasoline ",
            "Fuel type": "Diesel",
            "Fuel tank capacity (liters)": 80,
            "Consumption rate (fuel efficient)": "14.56 kilometers/liter",
            "Cylinder volume (cc)": "2300",
            "Horsepower": "190",
            "Safety System": "- ABS with EBD and BAn- Rear Differential Lockn- Dual front airbag with driver knee airbag driver siden- Side airbag and Curtain airbagn- Active Brake Limited Slip (ABLS)n- Vehicle Dynamic Control (VDC)n- Traction Control System (TCS)n- Trailer Stability Assist (TSA)n- Rear defoggern- High mount stop lamp (LED Type)n- Adjustable Front seat belt: ELR 3 points X 2 with pretensioner and load limitern- Rear seat seatbelt - ELR 3 points X 3n- ISOFIXn- Intelligent Keyn- Immobilizern- VSS Alarmn- Rear view cameran- Rear Parking Sensorn- Zone body structuren- Side impact door beamn- Crashable steering columnn- Automatic fuel valve cut (When rollover)",
            "Features": "- Interlock front grille in an intense black color, decorated with red & orange Nissan emblem, Quad-eye LED headlamps, and the Daytime Running Light.n- New 2.3-liter twin-turbo diesel engine of 190 horsepower and the 7-speed automatic transmission. Powerful, quiet, and fuel-saving.n- INTELLIGENT FORWARD COLLISION WARNING (IFCW), INTELLIGENT EMERGENCY BRAKING (IEB), INTELLIGENT DRIVER ALERTNESS (IDA), and 7 SRS airbags.n- INTELLIGENT BLIND SPOT INTERVENTION (IBSI), INTELLIGENT LANE INTERVENTION (ILI), and HIGH BEAM ASSIST (HBA).n- Black sporty interior with the red-threaded Quole Modure seats and the power driver seat adjustable in 8 directions.n- Interlock front grille in an intense black color, decorated with red & orange Nissan emblem, Quad-eye LED headlamps, and the Daytime Running Light.n- New Black alloy wheels with the off-road All-terrain tires and fender flares.n- INTELLIGENT AROUND VIEW MONITOR (IAVM) with 4x4 OFF-ROAD MODE.n- INTELLIGENT BLIND SPOT INTERVENTION (IBSI), INTELLIGENT LANE INTERVENTION (ILI), and HIGH BEAM ASSIST (HBA).n- Black sporty interior with the Quole Modure embroidered with PRO-4X emblem seats and the power driver seat adjustable in 8 directions.nn"
        },
        {
            "Brand": "Nissan",
            "Model": "NAVARA CALIBRE",
            "Color": "7 colorngrey (stealth grey) ,nred (burning red) ,nblack (black star) , nwhite (white pearl) , ncopper (forged copper),ngrey (twilight grey) ,nsliver (brilliant sliver) ",
            "Body Type": "Pickup Truck",
            "Segment ": "versatile",
            "Door": "2,4",
            "Seat": "2,4",
            "Year": 2024,
            "Price": "฿765,000-฿934,000",
            "Gear": "manual",
            "Drivetrain": "RWD",
            "Engine Type": "2.3-liter twin-turbo",
            "Powered by": "gasoline ",
            "Fuel type": "Diesel",
            "Fuel tank capacity (liters)": 80,
            "Consumption rate (fuel efficient)": "15.23 kilometers/liter",
            "Cylinder volume (cc)": "2300",
            "Horsepower": "163",
            "Safety System": "- ABS with EBD and BAn- Dual front airbagn- Active Brake Limited Slip (ABLS)n- Vehicle Dynamic Control (VDC)n- Traction Control System (TCS)n- Trailer Stability Assist (TSA)n- Rear defoggern- High mount stop lamp (LED Type)n- Adjustable Front seat belt: ELR 3 points X 2 with pretensioner and load limitern- Intelligent Keyn- Immobilizern- VSS Alarmn- Rear view cameran- Rear Parking Sensorn- Zone body structuren- Side impact door beamn- Crashable steering columnn- Automatic fuel valve cut (When rollover)nn",
            "Features": "- Interlock front grille with Quad-eye LED headlamps and the Daytime Running Lightn- New 2.3-liter VGS turbo diesel engine of 163 horsepower. Powerful and fuel-savingn- INTELLIGENT AROUND VIEW MONITOR (IAVM) with the MOVING OBJECT DETECTION (MOD) systemn- 8" Touch screen radio display with the NissanConnect technology for smartphones connectionn- VEHICLE DYNAMIC CONTROL (VDC), TRACTION CONTROL SYSTEM (TCS), and the HILL START ASSIST (HSA) systemn- Tri-zone climate control A/C system, including the back passenger's zonen- Exclusive black accessories: 18" Black Alloy wheels with the full-car Black Edition graphic pattern to enhance the fierceness like no othern- New 2.3-liter twin-turbo diesel engine of 190 horsepower with the 7-speed automatic transmission. Powerful, quiet, and fuel-saving.nFront and side acoustic glass for a quiet cabinn- INTELLIGENT FORWARD COLLISION WARNING (IFCW), n- INTELLIGENT EMERGENCY BRAKING (IEB), and INTELLIGENT DRIVER ALERTNESS (IDA) systemn- INTELLIGENT BLIND SPOT INTERVENTION (IBSI), INTELLIGENT LANE INTERVENTION (ILI), and HIGH BEAM ASSIST (HBA)n- Quole Modure leather seats with 8-direction adjustable power driver seatn- 18" Two-tone Alloy wheels"
        }
*more*

This json file is not the entire file and it has 3800 lines with around 600000 characters. I have embedded this data into the index of llamaindex.
The problem I found was that my chatbot was able to answer questions using a completely new set of data (about 2300 lines).

I’m trying to learn how to embed data by chunking it, but I don’t understand it enough to do it in node.js.
I want my chatbot to be able to retrieve all the information I provide to respond.
If anyone has a way, please guide me, I want to learn how to build an effective chatbot. Thank you for reading and thank you very much if you answer my questions.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật