Cyphon

Updated Documentation for Cyphon In Fixange

Cyphon: Loan Search Engine

Overview: Cyphon is a search engine that enables users to search for loan details using specific queries such as loan IDs, workflow IDs, and more. Currently, the search engine fetches loan data from a single source, specifically a MongoDB collection. The broader goal of Cyphon is to aggregate insights from multiple data sources into one unified platform.

Current Implementation: The current functionality relies on a MongoDB collection to retrieve loan data based on user queries. The LoanSearch.ts file is central to this process, enabling the asynchronous querying of loan data. However, the file has some issues, particularly with fetching loans specific to queries from the database. This issue needs to be addressed and fixed.


Check if you have all submodules present

  • you will need access to AI submodule to implement this functionality.

  • if u dont have access , ask for the access

  • if u have access but it is not present in your project repo use the following steps

  1. To add any submodule from the root directory where git run the below commands

    1. to install ai submodule run

      1. git submodule add ../../modules/<submodule-name>.git path
      2. git add .gitmodules path
      3. git commit -m "use your imagination"
      4. git push -u origin d <branch>
    2. similarly u can add any submodule to the project , below is the implementation for the ai submodule

      1. git submodule add ../../modules/ai.git server/modules/ai
      2. git add .gitmodules server/modules/ai
      3. git commit -m "added ai submodule"
      4. git push -u origin dev

Core Components of Cyphon

  1. LoanSearch.ts
  2. LoanService
  3. LoanDatabase

These components work together to provide an efficient and scalable loan search service.


searchLoans Functionality

  • Input Format: searchLoans(loanID: string)

  • loanID: The unique identifier for the loan whose details are to be fetched.

Purpose: The searchLoans function is designed to allow users to search for loan details using a specific loanID. Upon receiving the loanID, the system queries the loan database for the corresponding loan details and returns them in the form of a SearchCard. This structure provides the user with an easy-to-read summary of the loan details.


How It Works:

  1. Input: The user inputs a valid loanID to search for searchLoans(loanID: string)

  2. Querying the Database: The system queries the loan database (currently MongoDB) to fetch the loan details matching the provided loanID

  3. Async Processing: The query is processed asynchronously to ensure efficient handling of requests, especially when dealing with large datasets.

  4. Search Card Output: Once the loan details are fetched, they are formatted into a SearchCard

    , which contains relevant loan data such as loan amount, and then yielded to the user.

  5. Result Yield: The system uses async generators to yield the loan details, allowing the system to handle multiple queries concurrently, if necessary, improving scalability and performance.\n\n

    { cardType:"LoanSearchCard",
      title:`Loan Search Results - Query $(index+1)`,
      facts:{
        factId:uuidv4(),
        data:{
          json:loanChunk,
          expanded: true,
        },
      },
    }

Improvements:

The primary task for improving Cyphon is to fix the issues in the LoanSearch.ts file, specifically addressing the problem of fetching loans that are specific to the query from the database. Experimenting with the LoanSearch.ts file will help identify where the query handling fails and allow for more accurate loan data retrieval.

\

\