aiplanethub / genai-stack

An End to End GenAI Framework
https://genaistack.aiplanet.com/
Apache License 2.0
121 stars 40 forks source link

Caching Improvement - Not able to differentiate keywords between distinct sentences #91

Closed sam-aiplanet closed 7 months ago

sam-aiplanet commented 9 months ago

There are a couple of edge cases that we want to tackle in the caching layer.

plaban1981 commented 9 months ago

image

Question : What is the early stage grants for Key Developer or Engineer in ESOP allocation ? Response : the early stage grants for a Key Developer or Engineer in ESOP allocation are typically 1-2%.'

Question: What is the early stage grants for CTO in ESOP allocation ? Response: the early stage grants for a Key Developer or Engineer in ESOP allocation are typically 1-2%.'

For both the above questions the response is same as the the genaistack caching logic understands both the questions to be semantically same. But in actual the first question is intended for Key Developer while the second question is intended for the CTO

Issue 2: Caching should be given precedence over memory. But In GenAIstack if memory parameter is mentioned then caching is not considered, This is resulting in inconsistent response for the same question asked.

Example:

Question:: How to decide how much equity to be set aside in an ESOP?

Response : To decide how much equity to set aside in an ESOP, a combination of top-down and bottom-up planning is typically used. In the top-down approach, the total amount of equity to be granted is decided, and these shares are allocated to employees over time. On the other hand, the bottom-up approach involves deciding the appropriate size of individual equity grants by position and issuing these shares as employees are hired. By using both approaches, companies can determine the overall equity allocation and ensure that it aligns with the company's goals and employee needs.

same question I asked again

Question: How to decide how much equity to be set aside in an ESOP?

Response: To decide how much equity to set aside in an ESOP, you can consider factors such as the founders' roles, the company's DNA, geographic focus, and hiring needs. By looking at these factors, you can benchmark how much equity to allocate for the ESOP. Additionally, a combination of top-down and bottom-up planning can be used. In the top-down approach, the total amount of equity to be granted is decided and allocated over time. In the bottom-up approach, the size of individual equity grants is determined based on positions and issued as employees are hired. This combination of approaches helps determine the appropriate equity allocation for the ESOP.

The second response is a bit different from the first one