Skip to content

Commit 9477c2b

Browse files
committed
Update backend
1 parent b514531 commit 9477c2b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

backend/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ chroma_db/
4747
Thumbs.db
4848

4949
# Logs
50-
*.log
50+
*.log
5151
logs/
5252
chat_logs_*.json

backend/personal_data.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"basic": {
3-
"name": "Spectual",
3+
"name": "Yifei Bao",
44
"title": "AI Engineer / ML Engineer",
5-
"email": "ukubird@gmail.com",
5+
"email": "baoyfiei@bu.edu",
66
"location": "Boston, MA",
77
"summary": "A Master's student in Computer Science at Boston University with a background in AI. Experienced in developing end-to-end AI pipelines, computer vision, and machine learning algorithms. Proven ability to lead research teams and deliver full-featured software solutions. Honored with multiple scholarships and holder of a patent in flood disaster prediction."
88
},

backend/rag_system.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def _create_documents_from_data(self, data: Dict[str, Any]) -> List[Document]:
120120
preventing content overlap and duplication.
121121
"""
122122
documents = []
123-
123+
124124
# Basic Info as a single document
125125
basic_info_parts = [
126126
f"Name: {data['basic']['name']}",
@@ -148,7 +148,7 @@ def _create_documents_from_data(self, data: Dict[str, Any]) -> List[Document]:
148148
exp_content = f"""Position: {exp.get('title', 'N/A')} at {exp.get('company', 'N/A')} ({exp.get('duration', 'N/A')}).
149149
Responsibilities: {'; '.join(exp.get('responsibilities', []))}"""
150150
documents.append(Document(page_content=exp_content, metadata={"type": "experience", "company": exp.get('company', 'N/A')}))
151-
151+
152152
# Each Project as a separate document
153153
for i, proj in enumerate(data.get('projects', [])):
154154
proj_content = f"""Project: {proj.get('name', 'N/A')}.
@@ -168,7 +168,7 @@ def _create_documents_from_data(self, data: Dict[str, Any]) -> List[Document]:
168168
if data.get('publications'):
169169
pub_titles = [f"'{p.get('title', 'N/A')}'" for p in data.get('publications', [])]
170170
documents.append(Document(page_content=f"Authored publications including: {', '.join(pub_titles)}", metadata={"type": "publications"}))
171-
171+
172172
if data.get('patents'):
173173
patent_titles = [f"'{p.get('title', 'N/A')}'" for p in data.get('patents', [])]
174174
documents.append(Document(page_content=f"Holds patents including: {', '.join(patent_titles)}", metadata={"type": "patents"}))
@@ -178,7 +178,7 @@ def _create_documents_from_data(self, data: Dict[str, Any]) -> List[Document]:
178178

179179
if data.get('honors'):
180180
documents.append(Document(page_content=f"Honors and Awards: {', '.join(data.get('honors', []))}", metadata={"type": "honors"}))
181-
181+
182182
return documents
183183

184184
def build_vectorstore(self):
@@ -211,7 +211,7 @@ def get_summary_document(self) -> str:
211211
Returns the cached high-level summary text.
212212
"""
213213
return self.profile_summary
214-
214+
215215
def search_relevant_context(self, query: str, k: int = 5) -> str:
216216
"""
217217
Search for relevant context using Maximal Marginal Relevance (MMR)
@@ -257,4 +257,4 @@ def get_personal_info(self) -> Dict[str, Any]:
257257
return {
258258
"name": data['basic']['name'],
259259
"title": data['basic']['title']
260-
}
260+
}

0 commit comments

Comments
 (0)