mirror of https://github.com/hwchase17/langchain
[Fix][GenerativeAgent] Get the memory importance score from regex matched group (#4636)
# Get the memory importance score from regex matched group In `GenerativeAgentMemory`, the `_score_memory_importance()` will make a prompt to get a rating score. The prompt is: ``` prompt = PromptTemplate.from_template( "On the scale of 1 to 10, where 1 is purely mundane" + " (e.g., brushing teeth, making bed) and 10 is" + " extremely poignant (e.g., a break up, college" + " acceptance), rate the likely poignancy of the" + " following piece of memory. Respond with a single integer." + "\nMemory: {memory_content}" + "\nRating: " ) ``` For some LLM, it will respond with, for example, `Rating: 8`. Thus we might want to get the score from the matched regex group.pull/4655/head
parent
be405ac139
commit
432421ffa5
Loading…
Reference in New Issue