Tao Wu commited on
Commit
26cf43b
·
1 Parent(s): 7a6b5ad

add length limit

Browse files
Files changed (1) hide show
  1. app/embedding_setup.py +1 -1
app/embedding_setup.py CHANGED
@@ -129,7 +129,7 @@ def evaluate(
129
  def compare_docs_with_context(doc_a, doc_b, target_occupation_name, target_occupation_dsp,skill_gap):
130
 
131
  #courses = f"First: name: {doc_a.metadata['name']} description:{doc_a.metadata['description']} Second: name: {doc_b.metadata['name']} description:{Sdoc_b.metadata['description']}"
132
- courses = f"First: name: {doc_a.metadata['name']} learning outcomes:{doc_a.metadata['skills']} Second: name: {doc_b.metadata['name']} learning outcomes:{doc_b.metadata['skills']}"
133
  target_occupation = f"name: {target_occupation_name} description: {target_occupation_dsp}"
134
  skill_gap = skill_gap
135
  prompt = generate_prompt(target_occupation, skill_gap, courses)
 
129
  def compare_docs_with_context(doc_a, doc_b, target_occupation_name, target_occupation_dsp,skill_gap):
130
 
131
  #courses = f"First: name: {doc_a.metadata['name']} description:{doc_a.metadata['description']} Second: name: {doc_b.metadata['name']} description:{Sdoc_b.metadata['description']}"
132
+ courses = f"First: name: {doc_a.metadata['name']} learning outcomes:{doc_a.metadata['skills'][:2000]} Second: name: {doc_b.metadata['name']} learning outcomes:{doc_b.metadata['skills'][:2000]}"
133
  target_occupation = f"name: {target_occupation_name} description: {target_occupation_dsp}"
134
  skill_gap = skill_gap
135
  prompt = generate_prompt(target_occupation, skill_gap, courses)