Spaces:
Sleeping
Sleeping
Upload 5 files
Browse filesUploaded core scripts, knowledge base and files
- adversarial_framework.py +261 -0
- app.py +74 -0
- calebdata.json +872 -0
- rag_pipeline.py +80 -0
- requirements.txt +12 -0
adversarial_framework.py
ADDED
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# adversarial_framework.py
|
2 |
+
|
3 |
+
from typing import Literal, Dict, List, Tuple
|
4 |
+
from difflib import SequenceMatcher
|
5 |
+
from sentence_transformers import SentenceTransformer, util
|
6 |
+
from numpy.polynomial.polynomial import Polynomial
|
7 |
+
import nlpaug.augmenter.word as naw
|
8 |
+
import nltk
|
9 |
+
import numpy as np
|
10 |
+
import pandas as pd
|
11 |
+
import base64
|
12 |
+
from datetime import datetime
|
13 |
+
from io import BytesIO
|
14 |
+
import matplotlib.pyplot as plt
|
15 |
+
nltk.download('averaged_perceptron_tagger_eng')
|
16 |
+
|
17 |
+
class StatisticalEvaluator:
|
18 |
+
"""
|
19 |
+
Computes statistical insights over response similarity scores.
|
20 |
+
Useful for summarizing adversarial robustness.
|
21 |
+
"""
|
22 |
+
def __init__(self, scores: List[float]):
|
23 |
+
self.scores = np.array(scores)
|
24 |
+
|
25 |
+
def mean(self) -> float:
|
26 |
+
return round(np.mean(self.scores), 2)
|
27 |
+
|
28 |
+
def median(self) -> float:
|
29 |
+
return round(np.median(self.scores), 2)
|
30 |
+
|
31 |
+
def variance(self) -> float:
|
32 |
+
return round(np.var(self.scores), 2)
|
33 |
+
|
34 |
+
def std_dev(self) -> float:
|
35 |
+
return round(np.std(self.scores), 2)
|
36 |
+
|
37 |
+
def min_score(self) -> float:
|
38 |
+
return round(np.min(self.scores), 2)
|
39 |
+
|
40 |
+
def max_score(self) -> float:
|
41 |
+
return round(np.max(self.scores), 2)
|
42 |
+
|
43 |
+
def summary(self) -> Dict[str, float]:
|
44 |
+
return {
|
45 |
+
"mean": self.mean(),
|
46 |
+
"median": self.median(),
|
47 |
+
"std_dev": self.std_dev(),
|
48 |
+
"variance": self.variance(),
|
49 |
+
"min": self.min_score(),
|
50 |
+
"max": self.max_score(),
|
51 |
+
}
|
52 |
+
|
53 |
+
class SimilarityCalculator:
|
54 |
+
def __init__(self, model_name: str = "sentence-transformers/paraphrase-MiniLM-L3-v2"):
|
55 |
+
self.model = SentenceTransformer(model_name)
|
56 |
+
|
57 |
+
def cosine_similarity(self, original: str, perturbed: str) -> float:
|
58 |
+
emb1 = self.model.encode(original, convert_to_tensor=True)
|
59 |
+
emb2 = self.model.encode(perturbed, convert_to_tensor=True)
|
60 |
+
raw_score = util.pytorch_cos_sim(emb1, emb2).item()
|
61 |
+
clamped_score = max(0.0, min(raw_score, 1.0))
|
62 |
+
return round(clamped_score * 100, 2)
|
63 |
+
|
64 |
+
def sequence_similarity(self, original: str, perturbed: str) -> float:
|
65 |
+
return round(SequenceMatcher(None, original, perturbed).ratio() * 100, 2)
|
66 |
+
|
67 |
+
class AdversarialRiskCalculator:
|
68 |
+
def __init__(self, alpha: float = 2, beta: float = 1.5):
|
69 |
+
self.alpha = alpha
|
70 |
+
self.beta = beta
|
71 |
+
|
72 |
+
def compute_ari(self, query_sim: float, response_sim: float) -> float:
|
73 |
+
q, r = query_sim / 100, response_sim / 100
|
74 |
+
ari = ((1 - r) ** self.alpha) * ((1 + (1 - q)) ** self.beta)
|
75 |
+
return round(ari * 100, 2)
|
76 |
+
|
77 |
+
class PSCAnalyzer:
|
78 |
+
def __init__(self, degree: int = 5, r: int = 10):
|
79 |
+
self.r = r
|
80 |
+
self.degree = degree
|
81 |
+
|
82 |
+
def _bin_data(self, x: np.ndarray, y: np.ndarray, mode='max') -> Tuple[np.ndarray, np.ndarray]:
|
83 |
+
bins = np.linspace(min(x), max(x), self.r + 1)
|
84 |
+
best_x, best_y = [], []
|
85 |
+
|
86 |
+
for i in range(self.r):
|
87 |
+
mask = (x >= bins[i]) & (x < bins[i + 1])
|
88 |
+
sub_x, sub_y = x[mask], y[mask]
|
89 |
+
|
90 |
+
if len(sub_x) > 0:
|
91 |
+
if mode == 'max':
|
92 |
+
idx = np.argmax(sub_y)
|
93 |
+
elif mode == 'min':
|
94 |
+
idx = np.argmin(sub_y)
|
95 |
+
else:
|
96 |
+
raise ValueError("mode must be 'max' or 'min'")
|
97 |
+
|
98 |
+
best_x.append(sub_x[idx])
|
99 |
+
best_y.append(sub_y[idx])
|
100 |
+
|
101 |
+
return np.array(best_x), np.array(best_y)
|
102 |
+
|
103 |
+
def fit_and_auc(self, x, y):
|
104 |
+
x = np.array(x)
|
105 |
+
y = np.array(y)
|
106 |
+
|
107 |
+
coeffs = np.polyfit(x, y, self.degree)
|
108 |
+
poly_fn = np.poly1d(coeffs)
|
109 |
+
fitted_y = poly_fn(x)
|
110 |
+
|
111 |
+
auc_val = round(np.trapz(fitted_y, x), 4)
|
112 |
+
return auc_val, fitted_y
|
113 |
+
|
114 |
+
def plot_curve(self, x: np.ndarray, y: np.ndarray, fitted: np.ndarray, title: str, label: str, save_path=None):
|
115 |
+
plt.figure(figsize=(8, 5))
|
116 |
+
plt.plot(x, y, 'o', label='Sampled Points')
|
117 |
+
plt.plot(x, fitted, '--', label='Fitted Curve')
|
118 |
+
plt.xlabel('Perturbation / Queries')
|
119 |
+
plt.ylabel(label)
|
120 |
+
plt.title(title)
|
121 |
+
plt.legend()
|
122 |
+
plt.grid(True)
|
123 |
+
if save_path:
|
124 |
+
plt.savefig(save_path)
|
125 |
+
plt.show()
|
126 |
+
|
127 |
+
def evaluate(self, x_vals: List[float], y_vals: List[float], mode: str = 'max', label: str = 'ASR Curve') -> float:
|
128 |
+
x, y = self._bin_data(np.array(x_vals), np.array(y_vals), mode=mode)
|
129 |
+
auc_val, fitted = self.fit_and_auc(x, y)
|
130 |
+
self.plot_curve(x, y, fitted, title=f"PSC-{label}", label=label)
|
131 |
+
return auc_val
|
132 |
+
|
133 |
+
def run_psc_analysis(self, x_vals: List[float], y_vals: List[float], save_csv: str ="psc_export.csv", plot : bool = True):
|
134 |
+
auc = self.evaluate(x_vals, y_vals, mode="max", label="Semantic Similarity" if plot else "")
|
135 |
+
df = pd.DataFrame({"perturbation_level": x_vals, "response_similarity": y_vals})
|
136 |
+
df.to_csv(save_csv, index=False)
|
137 |
+
print(f"📉 PSC-AUC: {auc} | 📁 CSV saved to: {save_csv}")
|
138 |
+
return auc
|
139 |
+
|
140 |
+
class TextPerturber:
|
141 |
+
def __init__(self):
|
142 |
+
self.methods = {
|
143 |
+
"synonym": naw.SynonymAug(aug_src='wordnet'),
|
144 |
+
"delete": naw.RandomWordAug(action="delete"),
|
145 |
+
"contextual": naw.ContextualWordEmbsAug()
|
146 |
+
}
|
147 |
+
|
148 |
+
def perturb(self, input_text: str, aug_method: Literal["synonym", "delete", "contextual"] = "synonym") -> str:
|
149 |
+
if aug_method not in self.methods:
|
150 |
+
raise ValueError(f"Invalid method '{aug_method}'. Choose from {list(self.methods.keys())}.")
|
151 |
+
result = self.methods[aug_method].augment(input_text)
|
152 |
+
return result[0] if isinstance(result, list) else result
|
153 |
+
|
154 |
+
class AdversarialAttackPipeline:
|
155 |
+
def __init__(self, answer_generator):
|
156 |
+
self.similarity = SimilarityCalculator()
|
157 |
+
self.risk_calculator = AdversarialRiskCalculator()
|
158 |
+
self.perturber = TextPerturber()
|
159 |
+
self.answer_generator = answer_generator
|
160 |
+
|
161 |
+
def run(self, query: str, top_k: int = 3, perturb_method: str = "synonym") -> Dict:
|
162 |
+
normal_response = self.answer_generator(query, top_k)
|
163 |
+
perturbed_query = self.perturber.perturb(query, perturb_method)
|
164 |
+
adversarial_response = self.perturber.perturb(normal_response, perturb_method)
|
165 |
+
perturbed_response = self.answer_generator(perturbed_query, top_k)
|
166 |
+
|
167 |
+
cos_metrics = {
|
168 |
+
"query_sim": self.similarity.cosine_similarity(query, perturbed_query),
|
169 |
+
"adversarial_sim": self.similarity.cosine_similarity(normal_response, adversarial_response),
|
170 |
+
"response_sim": self.similarity.cosine_similarity(normal_response, perturbed_response),
|
171 |
+
}
|
172 |
+
|
173 |
+
seq_metrics = {
|
174 |
+
"query_seq_match": self.similarity.sequence_similarity(query, perturbed_query),
|
175 |
+
"adv_seq_match": self.similarity.sequence_similarity(normal_response, adversarial_response),
|
176 |
+
"resp_seq_match": self.similarity.sequence_similarity(normal_response, perturbed_response),
|
177 |
+
}
|
178 |
+
|
179 |
+
ari = self.risk_calculator.compute_ari(cos_metrics['query_sim'], cos_metrics['response_sim'])
|
180 |
+
|
181 |
+
self._print_report(query, normal_response, perturbed_query, perturbed_response, adversarial_response, cos_metrics, seq_metrics, ari)
|
182 |
+
|
183 |
+
return {
|
184 |
+
"normal_query": query,
|
185 |
+
"normal_response": normal_response,
|
186 |
+
"perturbed_query": perturbed_query,
|
187 |
+
"perturbed_response": perturbed_response,
|
188 |
+
"adversarial_response": adversarial_response,
|
189 |
+
"cos_sim": cos_metrics,
|
190 |
+
"seq_match": seq_metrics,
|
191 |
+
"ari": ari,
|
192 |
+
}
|
193 |
+
|
194 |
+
def _print_report(self, query, normal, pert_q, pert_r, adv_r, cos, seq, ari):
|
195 |
+
print("🔵 Original Query:", query)
|
196 |
+
print("\n🟢 Normal Response:", normal)
|
197 |
+
print("\n🔴 Direct Perturbation of Generated Response:", adv_r)
|
198 |
+
print("\n🟠 Perturbed Query:", pert_q)
|
199 |
+
print("\n🔴 Perturbed Response:", pert_r)
|
200 |
+
print(f"\n📊 Cosine Sim — Perturbed Query: {cos['query_sim']}%, Adversarial: {cos['adversarial_sim']}%, Perturbed Response: {cos['response_sim']}%")
|
201 |
+
print(f"\n📊 Seq Match — Perturbed Query: {seq['query_seq_match']}%, Adversarial: {seq['adv_seq_match']}%, Perturbed Response: {seq['resp_seq_match']}%")
|
202 |
+
print(f"\n🔺 ARI (Adversarial Risk Index): {ari}")
|
203 |
+
|
204 |
+
def plot_to_base64(self, fig):
|
205 |
+
"""
|
206 |
+
Converts a Matplotlib figure to a base64-encoded image string.
|
207 |
+
Useful for sending plots in web apps or saving as embeddable outputs.
|
208 |
+
"""
|
209 |
+
buf = BytesIO()
|
210 |
+
fig.savefig(buf, format='png')
|
211 |
+
buf.seek(0)
|
212 |
+
image_base64 = base64.b64encode(buf.read()).decode('utf-8')
|
213 |
+
buf.close()
|
214 |
+
return f"data:image/png;base64,{image_base64}"
|
215 |
+
|
216 |
+
def evaluate_adversarial_robustness(self, query, method, k, psc_degree: int = 4,
|
217 |
+
ep_min: float = 0.1, ep_max: float = 4.1,
|
218 |
+
ep_gap: float = 0.2):
|
219 |
+
"""
|
220 |
+
Evaluate semantic robustness of the pipeline over increasing perturbation intensities.
|
221 |
+
Added as instance method so pipeline context (e.g. answer generator) does not need to be recreated.
|
222 |
+
"""
|
223 |
+
epsilons = np.arange(ep_min, ep_max, ep_gap)
|
224 |
+
x_vals, y_vals, ari_vals = [], [], []
|
225 |
+
|
226 |
+
for epsilon in epsilons:
|
227 |
+
result = self.run(query=query, top_k=k, perturb_method=method)
|
228 |
+
x_vals.append(round(epsilon, 2))
|
229 |
+
y_vals.append(result['cos_sim']['response_sim'])
|
230 |
+
ari_vals.append(result['ari'])
|
231 |
+
|
232 |
+
auc = PSCAnalyzer(degree=psc_degree, r=10).evaluate(x_vals, y_vals, mode="max", label="Semantic Similarity")
|
233 |
+
|
234 |
+
stats = StatisticalEvaluator(y_vals).summary()
|
235 |
+
stats_text = "\n".join([f"{k}: {v}" for k, v in stats.items()])
|
236 |
+
|
237 |
+
# Save CSV with full results and stats
|
238 |
+
df = pd.DataFrame({
|
239 |
+
"Perturbation_Level": x_vals,
|
240 |
+
"Response_Similarity": y_vals,
|
241 |
+
"ARI": ari_vals
|
242 |
+
})
|
243 |
+
summary_df = pd.DataFrame.from_dict(stats, orient='index', columns=["Response_Similarity_Stats"])
|
244 |
+
summary_df.reset_index(inplace=True)
|
245 |
+
summary_df.rename(columns={"index": "Metric"}, inplace=True)
|
246 |
+
export_df = pd.concat([df, pd.DataFrame([{}]), summary_df], ignore_index=True)
|
247 |
+
export_df.to_csv("gradio_output.csv", index=False)
|
248 |
+
|
249 |
+
coeffs = np.polyfit(x_vals, y_vals, psc_degree)
|
250 |
+
poly_fn = np.poly1d(coeffs)
|
251 |
+
fitted = poly_fn(x_vals)
|
252 |
+
fig, ax = plt.subplots()
|
253 |
+
ax.plot(x_vals, y_vals, 'o', label='Sampled Points')
|
254 |
+
ax.plot(x_vals, fitted, '--', label='Fitted Curve')
|
255 |
+
ax.set_xlabel('Perturbation Level (Epsilon)')
|
256 |
+
ax.set_ylabel('Semantic Similarity')
|
257 |
+
ax.set_title('Perturbation Sensitivity Curve (PSC)')
|
258 |
+
ax.legend()
|
259 |
+
ax.grid(True)
|
260 |
+
|
261 |
+
return stats_text, auc, fig
|
app.py
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# -*- coding: utf-8 -*-
|
2 |
+
"""FULL WORKFLOW
|
3 |
+
|
4 |
+
Automatically generated by Colab.
|
5 |
+
|
6 |
+
Original file is located at
|
7 |
+
https://colab.research.google.com/drive/1I9KysFRYpSZfkL7FIxbodBYUgudQRejA
|
8 |
+
"""
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
!pip install transformers faiss-cpu gradio sentence-transformers nlpaug scikit-learn
|
13 |
+
|
14 |
+
# rag_module.py
|
15 |
+
|
16 |
+
import json
|
17 |
+
import faiss
|
18 |
+
import numpy as np
|
19 |
+
from sentence_transformers import SentenceTransformer, CrossEncoder
|
20 |
+
from sklearn.feature_extraction.text import TfidfVectorizer
|
21 |
+
from transformers import AutoTokenizer, T5ForConditionalGeneration
|
22 |
+
import gradio as gr
|
23 |
+
|
24 |
+
from rag_pipeline import RAGPipeline
|
25 |
+
|
26 |
+
from adversarial_framework import *
|
27 |
+
|
28 |
+
# Example Usage:
|
29 |
+
rag = RAGPipeline()
|
30 |
+
#print(rag.generate_answer("Who is the president of NACOS?"))
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
adv_pipeline = AdversarialAttackPipeline(answer_generator=rag.generate_answer)
|
35 |
+
|
36 |
+
# Gradio function
|
37 |
+
def gradio_wrapper(query, method, k):
|
38 |
+
stats_text, auc, fig, pert_q, pert_r, adv_r = adv_pipeline.evaluate_adversarial_robustness(
|
39 |
+
query=query,
|
40 |
+
method=method,
|
41 |
+
k=k
|
42 |
+
)
|
43 |
+
|
44 |
+
return (
|
45 |
+
stats_text,
|
46 |
+
f"{auc}",
|
47 |
+
fig,
|
48 |
+
f"🟠 Perturbed Query:\n\n{pert_q}",
|
49 |
+
f"🟢 Perturbed Response:\n\n{pert_r}",
|
50 |
+
f"🔴 Directly Perturbed Response of Normal Output:\n\n{adv_r}"
|
51 |
+
)
|
52 |
+
|
53 |
+
# Build Interface
|
54 |
+
gr.Interface(
|
55 |
+
fn=gradio_wrapper,
|
56 |
+
inputs=[
|
57 |
+
gr.Textbox(label="Enter a Question"),
|
58 |
+
gr.Dropdown(choices=["synonym", "delete", "contextual"], label="Perturbation Method"),
|
59 |
+
gr.Slider(1, 5, step=1, value=3, label="Top-K Retrieved Chunks")
|
60 |
+
],
|
61 |
+
outputs=[
|
62 |
+
gr.Textbox(label="📊 Summary Statistics"),
|
63 |
+
gr.Textbox(label="🔺 PSC-AUC Score"),
|
64 |
+
gr.Plot(label="📈 PSC Curve"),
|
65 |
+
gr.Textbox(label="🟠 Perturbed Query Example"),
|
66 |
+
gr.Textbox(label="🟢 Perturbed Response Example"),
|
67 |
+
gr.Textbox(label="🔴 Directly Perturbed Normal Response Example")
|
68 |
+
],
|
69 |
+
title="Adversarial Testing on RAGiant System",
|
70 |
+
description="Evaluate robustness against textual attacks and visualize degradation with ARI & PSC-AUC."
|
71 |
+
).launch()
|
72 |
+
|
73 |
+
|
74 |
+
|
calebdata.json
ADDED
@@ -0,0 +1,872 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"chunk_id": "AVMV-000",
|
4 |
+
"title": "Full Anthem Lyrics",
|
5 |
+
"section": "Anthem, Values, Mission, Vision",
|
6 |
+
"text": "Hail the Institution, Great!\nSo brave and full of faith,\nFor God and for Humanity,\nAn awesome Varsity.\nThere is peace within its walls,\nAnd joy and blessedness,\nMoral values are its stalls,\nWith love and faithfulness.\nFor the good LORD is our strength,\nOur song and salvation,\nDivine wisdom is thy breath,\nOur shield and solution.\nHail the great institution, CALEB!\nCitadel of knowledge!\nGreat and brave CALEB!\nFor one and for all.",
|
7 |
+
"metadata": {
|
8 |
+
"source": "Caleb University Profile",
|
9 |
+
"tags": [
|
10 |
+
"history",
|
11 |
+
"foundation",
|
12 |
+
"visitor",
|
13 |
+
"anthem",
|
14 |
+
"school anthem"
|
15 |
+
],
|
16 |
+
"college": null,
|
17 |
+
"type": "about"
|
18 |
+
}
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"chunk_id": "AVMV-001",
|
22 |
+
"title": "University Mission Statement",
|
23 |
+
"section": "Anthem, Values, Mission, Vision",
|
24 |
+
"text": "To provide globally competitive education and research in a godly environment with visible and positive societal impact.",
|
25 |
+
"metadata": {
|
26 |
+
"source": "Caleb University Profile",
|
27 |
+
"tags": [
|
28 |
+
"mission",
|
29 |
+
"values",
|
30 |
+
"mission statement"
|
31 |
+
],
|
32 |
+
"college": null,
|
33 |
+
"type": "about"
|
34 |
+
}
|
35 |
+
},
|
36 |
+
{
|
37 |
+
"chunk_id": "AVMV-002",
|
38 |
+
"title": "University Vision Statement",
|
39 |
+
"section": "Anthem, Values, Mission, Vision",
|
40 |
+
"text": "To be an innovative leader in producing impactful human resources, while sustaining excellence in learning, service, and godly character.",
|
41 |
+
"metadata": {
|
42 |
+
"source": "Caleb University Profile",
|
43 |
+
"tags": [
|
44 |
+
"vision",
|
45 |
+
"values",
|
46 |
+
"vision statement"
|
47 |
+
],
|
48 |
+
"college": null,
|
49 |
+
"type": "about"
|
50 |
+
}
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"chunk_id": "AVMV-003",
|
54 |
+
"title": "Seven Core Values",
|
55 |
+
"section": "Anthem, Values, Mission, Vision",
|
56 |
+
"text": "Core Values: There are 7 seven which are:\n1 Excellence \u00e2\u20ac\u201c Upholding academic and professional rigor.\n2 Integrity \u00e2\u20ac\u201c Ensuring honesty, transparency, and accountability.\n3 Service \u00e2\u20ac\u201c Embracing selflessness to uplift society.\n4 Innovation \u00e2\u20ac\u201c Fostering creativity and adaptive problem-solving.\n5 Inclusivity \u00e2\u20ac\u201c Valuing diversity and creating a welcoming environment.\n6 Leadership \u00e2\u20ac\u201c Nurturing ethical, visionary, and compassionate leaders.\n7 Community \u00e2\u20ac\u201c Encouraging collaboration, mutual respect, and support.",
|
57 |
+
"metadata": {
|
58 |
+
"source": "Caleb University Profile",
|
59 |
+
"tags": [
|
60 |
+
"foundation",
|
61 |
+
"values",
|
62 |
+
"seven core values"
|
63 |
+
],
|
64 |
+
"college": null,
|
65 |
+
"type": "about"
|
66 |
+
}
|
67 |
+
},
|
68 |
+
{
|
69 |
+
"chunk_id": "IOV-000",
|
70 |
+
"title": "University Background and Licensing",
|
71 |
+
"section": "Institutional Overview",
|
72 |
+
"text": "Caleb University, located in Imota, Lagos, received its provisional operating license from the Federal Government of Nigeria on May 17, 2007. The institution is owned by Dr. Ola Adebogun. Dr. Ola Adebogun serves as the Chairman and Visitor.",
|
73 |
+
"metadata": {
|
74 |
+
"source": "Caleb University Profile",
|
75 |
+
"tags": [
|
76 |
+
"history",
|
77 |
+
"foundation",
|
78 |
+
"relocation",
|
79 |
+
"location",
|
80 |
+
"background",
|
81 |
+
"established",
|
82 |
+
"founded",
|
83 |
+
"tell me about Caleb"
|
84 |
+
],
|
85 |
+
"college": null,
|
86 |
+
"type": "about"
|
87 |
+
}
|
88 |
+
},
|
89 |
+
{
|
90 |
+
"chunk_id": "IOV-001",
|
91 |
+
"title": "Program Approvals Timeline",
|
92 |
+
"section": "Institutional Overview",
|
93 |
+
"text": "The University officially commenced academic activities on January 21, 2008, admitting its pioneer students into three colleges. \n\nSince 2011, Caleb University has graduated eleven cohorts, all of whom have been successfully mobilized for the mandatory one-year National Youth Service Corps (NYSC).\n\nIn 2012, the National Universities Commission (NUC) approved Part-Time programmes under the Caleb Business School (CBS), as well as the establishment of the College of Postgraduate Studies (COPOS), which launched its first M.Sc. Architecture programme in March 2013. The College of Education (COLED) received NUC approval in August 2018, while the College of Law (COLAW) was accredited by both the NUC and the Council for Legal Education in 2021.",
|
94 |
+
"metadata": {
|
95 |
+
"source": "Caleb University Profile",
|
96 |
+
"tags": [
|
97 |
+
"legal approval",
|
98 |
+
"commencement",
|
99 |
+
"relocation"
|
100 |
+
],
|
101 |
+
"college": null,
|
102 |
+
"type": "about"
|
103 |
+
}
|
104 |
+
},
|
105 |
+
{
|
106 |
+
"chunk_id": "IOV-002",
|
107 |
+
"title": "Relocation & Permanent Site",
|
108 |
+
"section": "Institutional Overview",
|
109 |
+
"text": "Initially operating from its approved take-off site in Ikosi GRA, Lagos, the University relocated in November 2009 to its permanent 110-hectare campus situated at Km 15, Ikorodu-Itoikin Road, Imota, Lagos.",
|
110 |
+
"metadata": {
|
111 |
+
"source": "Caleb University Profile",
|
112 |
+
"tags": [
|
113 |
+
"history",
|
114 |
+
"establishment",
|
115 |
+
"relocation",
|
116 |
+
"location",
|
117 |
+
"how big is the Caleb land?"
|
118 |
+
],
|
119 |
+
"college": null,
|
120 |
+
"type": "about"
|
121 |
+
}
|
122 |
+
},
|
123 |
+
{
|
124 |
+
"chunk_id": "IOV-003",
|
125 |
+
"title": "More About Caleb",
|
126 |
+
"section": "Institutional Overview",
|
127 |
+
"text": "Caleb University is a center of excellence in teaching, learning, and research. Frequently ranked among the top 10 most sought-after private universities in Nigeria, CUL is recognized for its innovation and ability to transform ideas into impactful solutions. \nSince its inception, the institution has invested in nurturing individuals with curiosity, empathy, drive, and purpose. \nStudents of Caleb University are trained to be globally competitive while maintaining strong moral character and demonstrable academic excellence. \n Caleb University prioritizes discipleship work, fostering spiritual growth through chapel services, Bible studies, and discipleship programs. These initiatives encourage students to deepen their faith and develop character traits like integrity and compassion. Faculty and staff serve as mentors, guiding students in spiritual formation and ethical leadership. By integrating faith into the academic experience, Caleb equips students to live purposefully, embodying Christian values and making a positive impact in society.",
|
128 |
+
"metadata": {
|
129 |
+
"source": "Caleb University Profile",
|
130 |
+
"tags": [
|
131 |
+
"recognition",
|
132 |
+
"foundation",
|
133 |
+
"about",
|
134 |
+
"overview",
|
135 |
+
"rating",
|
136 |
+
"ranking",
|
137 |
+
"tell me about Caleb"
|
138 |
+
],
|
139 |
+
"college": null,
|
140 |
+
"type": "about"
|
141 |
+
}
|
142 |
+
},
|
143 |
+
{
|
144 |
+
"chunk_id": "GBT-000",
|
145 |
+
"title": "Visitor",
|
146 |
+
"section": "Gov. & Board of Trustees",
|
147 |
+
"text": "Governance, Board of Trustees",
|
148 |
+
"metadata": {
|
149 |
+
"source": "The Visitor, in Caleb University's case, Dr. Oladega Adebogun, is the Proprietor and Managing Director/CEO of Caleb Group of Schools. He also functions as an advisor and guide, ensuring the university adheres to its mission and values.\n The current Visitor is Dr. Oladega Adebogun",
|
150 |
+
"tags": [
|
151 |
+
"Caleb University Profile"
|
152 |
+
],
|
153 |
+
"college": "governance;owner;visitor;proprietor",
|
154 |
+
"type": "about"
|
155 |
+
}
|
156 |
+
},
|
157 |
+
{
|
158 |
+
"chunk_id": "GBT-001",
|
159 |
+
"title": "Chairman",
|
160 |
+
"section": "Gov. & Board of Trustees",
|
161 |
+
"text": "Governance, Board of Trustees",
|
162 |
+
"metadata": {
|
163 |
+
"source": "Prince Abiodun Ogunleye",
|
164 |
+
"tags": [
|
165 |
+
"Caleb University Profile"
|
166 |
+
],
|
167 |
+
"college": "governance;chairman",
|
168 |
+
"type": "about"
|
169 |
+
}
|
170 |
+
},
|
171 |
+
{
|
172 |
+
"chunk_id": "GBT-002",
|
173 |
+
"title": "Pro-Chancellor",
|
174 |
+
"section": "Gov. & Board of Trustees",
|
175 |
+
"text": "Governance, Board of Trustees",
|
176 |
+
"metadata": {
|
177 |
+
"source": "Prof. Fola Tayo",
|
178 |
+
"tags": [
|
179 |
+
"Caleb University Profile"
|
180 |
+
],
|
181 |
+
"college": "board of trustees;pro-chancellor",
|
182 |
+
"type": "about"
|
183 |
+
}
|
184 |
+
},
|
185 |
+
{
|
186 |
+
"chunk_id": "GBT-003",
|
187 |
+
"title": "Chancellor",
|
188 |
+
"section": "Gov. & Board of Trustees",
|
189 |
+
"text": "Governance, Board of Trustees",
|
190 |
+
"metadata": {
|
191 |
+
"source": "The Chancellor is a ceremonial head of the university, representing the institution at important events and advocating for its interests. The Chancellor may also play a role in fundraising and strategic planning. \n The current Chancellor is Chief (Dr.) Edwin K. Clark, OFR, CON",
|
192 |
+
"tags": [
|
193 |
+
"Caleb University Profile"
|
194 |
+
],
|
195 |
+
"college": "governance;ceremonial head;chancellor",
|
196 |
+
"type": "about"
|
197 |
+
}
|
198 |
+
},
|
199 |
+
{
|
200 |
+
"chunk_id": "MPO-000",
|
201 |
+
"title": "Vice-Chancellor",
|
202 |
+
"section": "Mgt. & Principal Officers",
|
203 |
+
"text": "The VC leads the university with strategic vision and direction, overseeing the implementation of academic policies and research initiatives. He/she plays a pivotal role in advancing the university's mission.\n The current Vice Chancellor is Prof. Nosa Owens-Ibie",
|
204 |
+
"metadata": {
|
205 |
+
"source": "Caleb University Profile",
|
206 |
+
"tags": [
|
207 |
+
"management",
|
208 |
+
"principal officers",
|
209 |
+
"VC",
|
210 |
+
"vc",
|
211 |
+
"vice-chancellor"
|
212 |
+
],
|
213 |
+
"college": null,
|
214 |
+
"type": "staff"
|
215 |
+
}
|
216 |
+
},
|
217 |
+
{
|
218 |
+
"chunk_id": "MPO-001",
|
219 |
+
"title": "Deputy Vice Chancellors",
|
220 |
+
"section": "Mgt. & Principal Officers",
|
221 |
+
"text": "There are two Deputy Vice Chancellors; DVC-RISA (Deputy Vice-Chancellor Research, Innovation, Strategy & Administration) Prof. Olalekan Asikhia & DVC-ACAD (Deputy Vice-Chancellor Academics) Prof. Sunday Adewale",
|
222 |
+
"metadata": {
|
223 |
+
"source": "Caleb University Profile",
|
224 |
+
"tags": [
|
225 |
+
"principal officers",
|
226 |
+
"management",
|
227 |
+
"deputy vice-chancellor",
|
228 |
+
"dvc",
|
229 |
+
"DVC",
|
230 |
+
"who is the DVC of Caleb University?",
|
231 |
+
"who is the Deputy Vice Chancellor of Caleb University?"
|
232 |
+
],
|
233 |
+
"college": null,
|
234 |
+
"type": "staff"
|
235 |
+
}
|
236 |
+
},
|
237 |
+
{
|
238 |
+
"chunk_id": "MPO-002",
|
239 |
+
"title": "Deputy Vice Chancellor (Research, Innovation, Strategy & Administration)",
|
240 |
+
"section": "Mgt. & Principal Officers",
|
241 |
+
"text": "The DVC RISA spearheads research excellence and strategic partnerships, driving innovation both within and beyond the university. Under his guidance, Caleb University aims to enhance its research capabilities and contribute to knowledge creation. \n The current DVC-RISA is Prof. Olalekan Asikhia",
|
242 |
+
"metadata": {
|
243 |
+
"source": "Caleb University Profile",
|
244 |
+
"tags": [
|
245 |
+
"principal officers",
|
246 |
+
"management",
|
247 |
+
"deputy vice-chancellor RISA",
|
248 |
+
"dvc",
|
249 |
+
"DVC",
|
250 |
+
"dvc-risa",
|
251 |
+
"dvc risa"
|
252 |
+
],
|
253 |
+
"college": null,
|
254 |
+
"type": "staff"
|
255 |
+
}
|
256 |
+
},
|
257 |
+
{
|
258 |
+
"chunk_id": "MPO-003",
|
259 |
+
"title": "Deputy Vice Chancellor (Academics)",
|
260 |
+
"section": "Mgt. & Principal Officers",
|
261 |
+
"text": "The DVC ACAD is responsible for academic affairs and student welfare, ensuring the delivery of high-quality education. This leadership focuses on promoting academic excellence and student-centered learning approaches.\nThe current DVC-Acad and Deputy Vice Chancellor is Prof. Sunday Adewale",
|
262 |
+
"metadata": {
|
263 |
+
"source": "Caleb University Profile",
|
264 |
+
"tags": [
|
265 |
+
"principal officers",
|
266 |
+
"management",
|
267 |
+
"deputy vice-chancellor ACAD",
|
268 |
+
"dvc",
|
269 |
+
"DVC",
|
270 |
+
"dvc-acad",
|
271 |
+
"dvc acad"
|
272 |
+
],
|
273 |
+
"college": null,
|
274 |
+
"type": "staff"
|
275 |
+
}
|
276 |
+
},
|
277 |
+
{
|
278 |
+
"chunk_id": "MPO-004",
|
279 |
+
"title": "Registrar",
|
280 |
+
"section": "Mgt. & Principal Officers",
|
281 |
+
"text": "The Registrar serves as the chief administrative officer, managing university records, admissions, and examinations. With meticulous attention to detail, he/she ensures the integrity and efficiency of administrative processes. \nThe current Registrar is Mr. Mayokun Olumeru",
|
282 |
+
"metadata": {
|
283 |
+
"source": "Caleb University Profile",
|
284 |
+
"tags": [
|
285 |
+
"principal officers",
|
286 |
+
"management",
|
287 |
+
"registrar"
|
288 |
+
],
|
289 |
+
"college": null,
|
290 |
+
"type": "about"
|
291 |
+
}
|
292 |
+
},
|
293 |
+
{
|
294 |
+
"chunk_id": "MPO-005",
|
295 |
+
"title": "Bursar",
|
296 |
+
"section": "Mgt. & Principal Officers",
|
297 |
+
"text": "The Bursar oversees financial management and resource allocation, maintaining fiscal discipline and transparency. This stewardship contributes to the financial sustainability of the university. The current Bursar is Mr. Adesina Abubakre",
|
298 |
+
"metadata": {
|
299 |
+
"source": "Caleb University Profile",
|
300 |
+
"tags": [
|
301 |
+
"principal officers",
|
302 |
+
"management",
|
303 |
+
"bursar"
|
304 |
+
],
|
305 |
+
"college": null,
|
306 |
+
"type": "staff"
|
307 |
+
}
|
308 |
+
},
|
309 |
+
{
|
310 |
+
"chunk_id": "MPO-006",
|
311 |
+
"title": "Librarian",
|
312 |
+
"section": "Mgt. & Principal Officers",
|
313 |
+
"text": "The Librarian leads library services, providing access to academic resources and supporting scholarly communication. The librarian works to foster a dynamic learning environment that encourages intellectual exploration on campus. The current librarian is Mr. Josiah Adeyomoye",
|
314 |
+
"metadata": {
|
315 |
+
"source": "Caleb University Profile",
|
316 |
+
"tags": [
|
317 |
+
"principal officers",
|
318 |
+
"management",
|
319 |
+
"librarian"
|
320 |
+
],
|
321 |
+
"college": null,
|
322 |
+
"type": "staff"
|
323 |
+
}
|
324 |
+
},
|
325 |
+
{
|
326 |
+
"chunk_id": "MPO-007",
|
327 |
+
"title": "University Governance Structure",
|
328 |
+
"section": "Mgt. & Principal Officers",
|
329 |
+
"text": "Caleb University operates a three-tier management structure consisting of the Board of Trustees, the Governing Council, and the University Management which is also known as pricipal officers.",
|
330 |
+
"metadata": {
|
331 |
+
"source": "Caleb University Profile",
|
332 |
+
"tags": [
|
333 |
+
"principal officers",
|
334 |
+
"management",
|
335 |
+
"university management"
|
336 |
+
],
|
337 |
+
"college": null,
|
338 |
+
"type": "about"
|
339 |
+
}
|
340 |
+
},
|
341 |
+
{
|
342 |
+
"chunk_id": "MPO-008",
|
343 |
+
"title": "Executive Positions in Governance",
|
344 |
+
"section": "Mgt. & Principal Officers",
|
345 |
+
"text": "The Visitor is Dr. Oladega Adebogun with Board of Trustees is chaired by Prince Abiodun Ogunleye, while the Governing Council is chaired by Prof. Fola Tayo, who also serves as the Pro-Chancellor. ",
|
346 |
+
"metadata": {
|
347 |
+
"source": "Caleb University Profile",
|
348 |
+
"tags": [
|
349 |
+
"board of trustees",
|
350 |
+
"governing council",
|
351 |
+
"management"
|
352 |
+
],
|
353 |
+
"college": null,
|
354 |
+
"type": "about"
|
355 |
+
}
|
356 |
+
},
|
357 |
+
{
|
358 |
+
"chunk_id": "MPO-009",
|
359 |
+
"title": "Principal Officers also known as University Management",
|
360 |
+
"section": "Mgt. & Principal Officers",
|
361 |
+
"text": "The University Management is led by six Principal Officers: Prof. Nosa Owens-Ibie (Vice Chancellor), Prof. Olalekan Asikhia (DVC \u00e2\u20ac\u201c Research, Innovation, Strategy & Admin), Prof. Sunday Adewale (DVC \u00e2\u20ac\u201c Academics), Mr. Mayokun Olumeru (Registrar), Mr. Adesina Abubakre (Bursar), and Mr. Josiah Adeyomoye (University Librarian).",
|
362 |
+
"metadata": {
|
363 |
+
"source": "Caleb University Profile",
|
364 |
+
"tags": [
|
365 |
+
"principal officers",
|
366 |
+
"management",
|
367 |
+
"university management"
|
368 |
+
],
|
369 |
+
"college": null,
|
370 |
+
"type": "about"
|
371 |
+
}
|
372 |
+
},
|
373 |
+
{
|
374 |
+
"chunk_id": "ACA-000",
|
375 |
+
"title": "Colleges & Faculties",
|
376 |
+
"section": "Academic Programmes",
|
377 |
+
"text": "Caleb has over 30 undergraduate degree programmes and 10+ postgraduate degree programmes across seven colleges: COPAS, CONBAMS, COLENSMA, CASMAS, COPOS, COLAW, COLED. All mature programmes/courses are accredited by the NUC and respective professional bodies.",
|
378 |
+
"metadata": {
|
379 |
+
"source": "Caleb University Profile",
|
380 |
+
"tags": [
|
381 |
+
"programs",
|
382 |
+
"courses",
|
383 |
+
"programs",
|
384 |
+
"programmes",
|
385 |
+
"departments",
|
386 |
+
"programs",
|
387 |
+
"colleges"
|
388 |
+
],
|
389 |
+
"college": "all",
|
390 |
+
"type": "academic"
|
391 |
+
}
|
392 |
+
},
|
393 |
+
{
|
394 |
+
"chunk_id": "ACA-001",
|
395 |
+
"title": "Offices & Positions in Colleges",
|
396 |
+
"section": "Academic Programmes",
|
397 |
+
"text": "Dean: Every college has a dean of College that sits as the presiding office usually over all college affairs. \nDeputy Dean: This individual assists the Dean in decision-making as well as execution. There is no dedicated physical office for this role though.\nHead of Department (HOD): Every department has a head that coordinates activities within the department unit. This individual oversees the activities of students and is the directly above lecturers in the pecking order. His/her approval is also needed in many official cases\nCollege Secretary: This person is concerned with the taking down minutes in College wide meetings, holding the records of personnel in a College amongst other things. \n Department Secretary: This individual is saddled with the responsiblity of assisting at the Department office, ensuring all records are well kept. /n Lecturer: is the individual that pours out wealth of experience and knowledge into students in the department. /nLevel Adviser/Advisor: this individual handles student queries and answers questions as relating to grades, courses and wellbeing of the general student populace in a level",
|
398 |
+
"metadata": {
|
399 |
+
"source": "Caleb University Profile",
|
400 |
+
"tags": [
|
401 |
+
"college posts",
|
402 |
+
"positions",
|
403 |
+
"colleges"
|
404 |
+
],
|
405 |
+
"college": "all",
|
406 |
+
"type": "staff"
|
407 |
+
}
|
408 |
+
},
|
409 |
+
{
|
410 |
+
"chunk_id": "ACA-002",
|
411 |
+
"title": "Programs under COPAS",
|
412 |
+
"section": "Academic Programmes",
|
413 |
+
"text": "This college cultivates scientific curiosity and practical knowledge through diverse programs in life, physical, and computing sciences. Students engage in cutting-edge research under experienced faculty. \nThe College of Pure and Applied Sciences (COPAS) offers eight undergraduate programs: B.Sc. Biochemistry, B.Sc. Computer Science, B.Sc. Cyber Security, B.Sc. Environmental Management and Toxicology, B.Sc. Industrial Chemistry, B.Sc. Information Systems, B.Sc. Microbiology and Industrial Biotechnology, B.Sc. Software Engineering.",
|
414 |
+
"metadata": {
|
415 |
+
"source": "Caleb University Profile",
|
416 |
+
"tags": [
|
417 |
+
"programs",
|
418 |
+
"courses",
|
419 |
+
"programmes",
|
420 |
+
"departments",
|
421 |
+
"science",
|
422 |
+
"COPAS"
|
423 |
+
],
|
424 |
+
"college": "COPAS",
|
425 |
+
"type": "academic"
|
426 |
+
}
|
427 |
+
},
|
428 |
+
{
|
429 |
+
"chunk_id": "ACA-003",
|
430 |
+
"title": "Programs/Courses under CASMAS",
|
431 |
+
"section": "Academic Programmes",
|
432 |
+
"text": "CASMAS equips students with a blend of analytical, creative, and managerial skills for societal transformation and economic development. The College fosters critical thinking and innovation. \nThe College of Social and Management Sciences (CASMAS) offers twelve undergraduate programs: B.Sc. Accounting, B.Sc. Taxation, B.Sc. Banking and Finance, B.Sc. Business Administration (Marketing, General Business, HRM), B.Sc. Criminology and Security Studies, B.Sc. Economics, B.Sc. International Relations, B.Sc. Mass Communication (Print, PR & Advertising, Broadcast, Film & Cinematography), B.Sc. Peace Studies and Conflict Resolution, B.Sc. Political Science, B.Sc. Public Administration, B.Sc. Psychology",
|
433 |
+
"metadata": {
|
434 |
+
"source": "Caleb University Profile",
|
435 |
+
"tags": [
|
436 |
+
"programs",
|
437 |
+
"courses",
|
438 |
+
"programmes",
|
439 |
+
"departments",
|
440 |
+
"arts",
|
441 |
+
"CASMAS"
|
442 |
+
],
|
443 |
+
"college": "CASMAS",
|
444 |
+
"type": "academic"
|
445 |
+
}
|
446 |
+
},
|
447 |
+
{
|
448 |
+
"chunk_id": "ACA-004",
|
449 |
+
"title": "Programs under COLENSMA",
|
450 |
+
"section": "Academic Programmes",
|
451 |
+
"text": "COLENSMA trains professionals in sustainable design and environmental management. With practical projects and expert faculty, students are equipped for a future in architecture, urban planning, and more.\nThe College of Environmental Sciences & Management (COLENSMA) offers three undergraduate programs/courses/departments: B.Sc./M.Sc. Architecture (6-year program), B.Sc. Estate Management, B.Sc. Quanitity Surveying",
|
452 |
+
"metadata": {
|
453 |
+
"source": "Caleb University Profile",
|
454 |
+
"tags": [
|
455 |
+
"programs",
|
456 |
+
"courses",
|
457 |
+
"programmes",
|
458 |
+
"departments",
|
459 |
+
"architecture",
|
460 |
+
"estate",
|
461 |
+
"COLENSMA"
|
462 |
+
],
|
463 |
+
"college": "COLENSMA",
|
464 |
+
"type": "academic"
|
465 |
+
}
|
466 |
+
},
|
467 |
+
{
|
468 |
+
"chunk_id": "ACA-005",
|
469 |
+
"title": "Programs under COLAW",
|
470 |
+
"section": "Academic Programmes",
|
471 |
+
"text": "COLAW is committed to producing principled legal professionals. With a strong academic foundation and ethical orientation, students are groomed for leadership in legal practice and governance. \nThe College of Law (COLAW) offers two programs: LLB/LLM Public Law, LLB/LLM Private and Property Law",
|
472 |
+
"metadata": {
|
473 |
+
"source": "Caleb University Profile",
|
474 |
+
"tags": [
|
475 |
+
"programs",
|
476 |
+
"courses",
|
477 |
+
"programmes",
|
478 |
+
"departments",
|
479 |
+
"law",
|
480 |
+
"legal",
|
481 |
+
"COLAW"
|
482 |
+
],
|
483 |
+
"college": "COLAW",
|
484 |
+
"type": "academic"
|
485 |
+
}
|
486 |
+
},
|
487 |
+
{
|
488 |
+
"chunk_id": "ACA-006",
|
489 |
+
"title": "Programs under CONBAMS",
|
490 |
+
"section": "Academic Programmes",
|
491 |
+
"text": "This college produces world-class nurses and health professionals through a curriculum focused on clinical excellence and global health standards. \nThe College of Nursing and Basic Medical Sciences (CONBAMS) offers three programs: B.N.Sc. Nursing Science, B.Sc. Human Anatomy, B.Sc. Human Physiology",
|
492 |
+
"metadata": {
|
493 |
+
"source": "Caleb University Profile",
|
494 |
+
"tags": [
|
495 |
+
"programs",
|
496 |
+
"courses",
|
497 |
+
"programmes",
|
498 |
+
"departments",
|
499 |
+
"nursing",
|
500 |
+
"medicine",
|
501 |
+
"science",
|
502 |
+
"CONBAMS"
|
503 |
+
],
|
504 |
+
"college": "CONBAMS",
|
505 |
+
"type": "academic"
|
506 |
+
}
|
507 |
+
},
|
508 |
+
{
|
509 |
+
"chunk_id": "ACA-007",
|
510 |
+
"title": "Programs under COPOS",
|
511 |
+
"section": "Academic Programmes",
|
512 |
+
"text": "COPOS offers advanced degrees across various disciplines, with faculty members who are seasoned researchers. The College supports innovative research and professional growth. \nThe College of Postgraduate Studies (COPOS) offers nine programs: Architecture (Ph.D, M.Sc), Accounting, Taxation & Finance (M.Phil./Ph.D, M.Sc, PGD, MBA options), Economics (M.Phil./Ph.D, M.Sc, PGD), Computer Science (M.Phil./Ph.D, M.Sc, PGD), Mass Communication (M.Phil./Ph.D, M.Sc, PGD), Business Administration [MBA Specializations] (HR, Marketing, General, International Business, Management), Political Science & International Relations (M.Phil./Ph.D, M.Sc, PGD), Microbiology & Biochemistry (M.Phil./Ph.D, M.Sc, PGD), Christian Religious Studies (M.Phil./Ph.D, M.Ed, PGDE)",
|
513 |
+
"metadata": {
|
514 |
+
"source": "Caleb University Profile",
|
515 |
+
"tags": [
|
516 |
+
"programs",
|
517 |
+
"courses",
|
518 |
+
"programmes",
|
519 |
+
"departments",
|
520 |
+
"masters",
|
521 |
+
"postgraduate",
|
522 |
+
"COPOS"
|
523 |
+
],
|
524 |
+
"college": "COPOS",
|
525 |
+
"type": "academic"
|
526 |
+
}
|
527 |
+
},
|
528 |
+
{
|
529 |
+
"chunk_id": "ACA-008",
|
530 |
+
"title": "Programs under COLED",
|
531 |
+
"section": "Academic Programmes",
|
532 |
+
"text": "The College of Education (COLED) has a couple of departments, but more inquires can be made by contacting.",
|
533 |
+
"metadata": {
|
534 |
+
"source": "Caleb University Profile",
|
535 |
+
"tags": [
|
536 |
+
"programs",
|
537 |
+
"courses",
|
538 |
+
"programmes",
|
539 |
+
"departments",
|
540 |
+
"education",
|
541 |
+
"COLED"
|
542 |
+
],
|
543 |
+
"college": "COLED",
|
544 |
+
"type": "academic"
|
545 |
+
}
|
546 |
+
},
|
547 |
+
{
|
548 |
+
"chunk_id": "ORG-000",
|
549 |
+
"title": "SRC",
|
550 |
+
"section": "Organizations",
|
551 |
+
"text": "The Student Representative Council (SRC) is a student led group that is saddled with representing student opinions and as well as relating pain points to the Vice Chancellor and Management. It is the variant of what many in public schools would refer to as the Student Union. The current President is David, and Vice-President Mari Omoge. Leaders are delegated based on multiple criteria, and not by open balloting",
|
552 |
+
"metadata": {
|
553 |
+
"source": "Research and Observation",
|
554 |
+
"tags": [
|
555 |
+
"organizations",
|
556 |
+
"student union"
|
557 |
+
],
|
558 |
+
"college": null,
|
559 |
+
"type": "internal"
|
560 |
+
}
|
561 |
+
},
|
562 |
+
{
|
563 |
+
"chunk_id": "ORG-001",
|
564 |
+
"title": "CUAPASS",
|
565 |
+
"section": "Organizations",
|
566 |
+
"text": "CUAPASS stands for Caleb University of Pure and Applied Sciences. It comprises of all students in COPAS. Presidency is based on the results of yearly polls.",
|
567 |
+
"metadata": {
|
568 |
+
"source": "Research and Observation",
|
569 |
+
"tags": [
|
570 |
+
"organizations",
|
571 |
+
"College of Pure and Applied Sciences",
|
572 |
+
"copas"
|
573 |
+
],
|
574 |
+
"college": null,
|
575 |
+
"type": "internal"
|
576 |
+
}
|
577 |
+
},
|
578 |
+
{
|
579 |
+
"chunk_id": "ORG-002",
|
580 |
+
"title": "NACOS",
|
581 |
+
"section": "Organizations",
|
582 |
+
"text": "NACOS stands for NAtional Association of Computing Students.NACOS Caleb Chapter is an association made up of students studying Computer Science, Information Technology, & Software Engineering as well as any other Computing related field. \nIt has the goal to serve both professional and public interests by fostering the open interchange of information and by promoting the highest professional and ethical standards. It organizes seminars, symposia, webinars, computing contests, and other activities aimed at achieving this goal./n The current president of NACOS is Chibuzor Nwachukwu, and the Vice Presidents are Damilola (VP National) and Daniel (VP International). Elections and activities are carried out in accordance to the provisions of the NACOS Consistution ",
|
583 |
+
"metadata": {
|
584 |
+
"source": "Research and Observation",
|
585 |
+
"tags": [
|
586 |
+
"organizations",
|
587 |
+
"computer society",
|
588 |
+
"computer science",
|
589 |
+
"NACOS"
|
590 |
+
],
|
591 |
+
"college": null,
|
592 |
+
"type": "internal"
|
593 |
+
}
|
594 |
+
},
|
595 |
+
{
|
596 |
+
"chunk_id": "ORG-003",
|
597 |
+
"title": "GDGoC",
|
598 |
+
"section": "Organizations",
|
599 |
+
"text": "GDGoC Caleb Chapter stands for Google Developer Group, on-Campus Caleb University Chapter (formerly known as GDSC Caleb Chapter). It is an association backed by Google and is saddled with the responsibility of driving tech initiatives irrespective of department barriers. With tracks like data, Cybersecurity, Networking, IOT, it is poised to place Caleb at the frontiers of technological advancement. The current Lead is EFOD Freda, flanked by ADEBULE John. Leadership is conferred by GDG group based on certain qualifications and a rigorous interview procedure organized by Google.",
|
600 |
+
"metadata": {
|
601 |
+
"source": "Research and Observation",
|
602 |
+
"tags": [
|
603 |
+
"organizations",
|
604 |
+
"GDG",
|
605 |
+
"GDSC",
|
606 |
+
"GDGoC"
|
607 |
+
],
|
608 |
+
"college": null,
|
609 |
+
"type": "internal"
|
610 |
+
}
|
611 |
+
},
|
612 |
+
{
|
613 |
+
"chunk_id": "ORG-004",
|
614 |
+
"title": "CSEAN",
|
615 |
+
"section": "Organizations",
|
616 |
+
"text": null,
|
617 |
+
"metadata": {
|
618 |
+
"source": null,
|
619 |
+
"tags": [
|
620 |
+
"nan"
|
621 |
+
],
|
622 |
+
"college": null,
|
623 |
+
"type": null
|
624 |
+
}
|
625 |
+
},
|
626 |
+
{
|
627 |
+
"chunk_id": "TMC-000",
|
628 |
+
"title": "About",
|
629 |
+
"section": "The Master's Chapel",
|
630 |
+
"text": "The school's church, The Master's Chapel is a vital part of Caleb University, complementing a student\u00e2\u20ac\u2122s academic and spiritual experience, and providing the campus community with a dynamic worship experience. Every Monday, Wednesday, and Friday, students, faculty, and staff gather for a time centered on the expositional preaching of Scripture. Speakers include chaplains, pastors, missionaries, faculty members, Christian leaders, and students.",
|
631 |
+
"metadata": {
|
632 |
+
"source": "Research and Observation",
|
633 |
+
"tags": [
|
634 |
+
"church",
|
635 |
+
"prayer",
|
636 |
+
"chapel",
|
637 |
+
"TMC"
|
638 |
+
],
|
639 |
+
"college": null,
|
640 |
+
"type": "internal"
|
641 |
+
}
|
642 |
+
},
|
643 |
+
{
|
644 |
+
"chunk_id": "TMC-001",
|
645 |
+
"title": "Leadership",
|
646 |
+
"section": "The Master's Chapel",
|
647 |
+
"text": "The Chaplaincy consists of the Chaplain and The Assistant. Currently, these two positions are occupied by Pastor Paul Adeboyega and Pastor Chibuzor respectively. Every session, student leaders known as executives, spearheaded by the General Co-ordinator (also known as G.C) are elected by the leading of The Holy Spirit to assist the Chaplaincy as God ministers to His people.",
|
648 |
+
"metadata": {
|
649 |
+
"source": "Research and Observation",
|
650 |
+
"tags": [
|
651 |
+
"church",
|
652 |
+
"chapel",
|
653 |
+
"TMC",
|
654 |
+
"executives",
|
655 |
+
"chaplaincy"
|
656 |
+
],
|
657 |
+
"college": null,
|
658 |
+
"type": "internal"
|
659 |
+
}
|
660 |
+
},
|
661 |
+
{
|
662 |
+
"chunk_id": "TMC-002",
|
663 |
+
"title": "The Chapliancy",
|
664 |
+
"section": "The Master's Chapel",
|
665 |
+
"text": "The Chaplain (also known as Pastor) provides spiritual guidance and support to students and staff, promoting religious activities and fostering a sense of community. This role involves organizing religious services, offering pastoral care, counselling, and promoting ethical behavior in line with the university's values. /nThe Assistant Chaplain supports the Chaplain in their duties, as they both ensure that the religious needs of the university community are met",
|
666 |
+
"metadata": {
|
667 |
+
"source": "Research and Observation",
|
668 |
+
"tags": [
|
669 |
+
"church",
|
670 |
+
"chapel",
|
671 |
+
"TMC",
|
672 |
+
"chaplaincy"
|
673 |
+
],
|
674 |
+
"college": null,
|
675 |
+
"type": "internal"
|
676 |
+
}
|
677 |
+
},
|
678 |
+
{
|
679 |
+
"chunk_id": "TMC-003",
|
680 |
+
"title": "Worship Schedules",
|
681 |
+
"section": "The Master's Chapel",
|
682 |
+
"text": "Worship meetings and gatherings takes place on Monday, Wednesday, Friday, and Saturday all with varying times each day, mostly determined by the Student Affairs Officer and/or The Chaplaincy. On Sundays, Mondays, Tuesdays and Wednesdays, services are either based on hall of residence or level. \n Sunday meetings typically start by 07:00, with 3-4 services held. \n On Mondays & Wednesdays respectively, two consecutive worship services (typically 1hr30mins long) are held, between 17:00 and 20:00. On Tuesdays, Discipleship meeting, between 17:00 and 18:30. On the other days, services and meetings are scheduled for workers alone as well as disiples.",
|
683 |
+
"metadata": {
|
684 |
+
"source": "Research and Observation",
|
685 |
+
"tags": [
|
686 |
+
"church",
|
687 |
+
"chapel",
|
688 |
+
"TMC",
|
689 |
+
"schedule",
|
690 |
+
"time",
|
691 |
+
"meeting",
|
692 |
+
"gathering"
|
693 |
+
],
|
694 |
+
"college": null,
|
695 |
+
"type": "internal"
|
696 |
+
}
|
697 |
+
},
|
698 |
+
{
|
699 |
+
"chunk_id": "TMC-004",
|
700 |
+
"title": "Executives",
|
701 |
+
"section": "The Master's Chapel",
|
702 |
+
"text": "Young students are selected to lead in various capacities and over the 11 departments, from being hostel representatives, to Heads of Ushering, Protocol, Choir, Media, Sanctuary, Prayer departments etc",
|
703 |
+
"metadata": {
|
704 |
+
"source": null,
|
705 |
+
"tags": [
|
706 |
+
"nan"
|
707 |
+
],
|
708 |
+
"college": null,
|
709 |
+
"type": null
|
710 |
+
}
|
711 |
+
},
|
712 |
+
{
|
713 |
+
"chunk_id": "TMC-005",
|
714 |
+
"title": "Overview of Departments",
|
715 |
+
"section": "The Master's Chapel",
|
716 |
+
"text": "There are 10 departments altogether in the Master's Chapel Workforce. Choir who go by the name Glorious Ministers, Protocol, Ushering, Prayer, Evangelism, Devotional Leaders, Sanctuary, Library, Accounting, Media, Drama who go by the name Royal Family",
|
717 |
+
"metadata": {
|
718 |
+
"source": null,
|
719 |
+
"tags": [
|
720 |
+
"nan"
|
721 |
+
],
|
722 |
+
"college": null,
|
723 |
+
"type": null
|
724 |
+
}
|
725 |
+
},
|
726 |
+
{
|
727 |
+
"chunk_id": "TMC-006",
|
728 |
+
"title": "Protocol Department",
|
729 |
+
"section": "The Master's Chapel",
|
730 |
+
"text": "They are saddled with the reponsibility of ensuring compliance during the service, which allows for the flow of God's Word and the express move of His Spirit. In some instances, they seize phones and give warnings to those attempting to distrupt the services",
|
731 |
+
"metadata": {
|
732 |
+
"source": null,
|
733 |
+
"tags": [
|
734 |
+
"nan"
|
735 |
+
],
|
736 |
+
"college": null,
|
737 |
+
"type": null
|
738 |
+
}
|
739 |
+
},
|
740 |
+
{
|
741 |
+
"chunk_id": "TMC-007",
|
742 |
+
"title": "Ushering Department",
|
743 |
+
"section": "The Master's Chapel",
|
744 |
+
"text": "They are workers that ensure that the congragation flows well into the service as well as are ministered to in terms of offering and tithe envelops, catering and so on. They work with the Protocol officers on some occasions.",
|
745 |
+
"metadata": {
|
746 |
+
"source": null,
|
747 |
+
"tags": [
|
748 |
+
"nan"
|
749 |
+
],
|
750 |
+
"college": null,
|
751 |
+
"type": null
|
752 |
+
}
|
753 |
+
},
|
754 |
+
{
|
755 |
+
"chunk_id": "TMC-008",
|
756 |
+
"title": "Choir Department",
|
757 |
+
"section": "The Master's Chapel",
|
758 |
+
"text": "These are minsters that carry God's presence and power into the service with songs. Through their Spirit-filled sound, they are poised to lift burdens as well as break the chains of attendees.",
|
759 |
+
"metadata": {
|
760 |
+
"source": null,
|
761 |
+
"tags": [
|
762 |
+
"nan"
|
763 |
+
],
|
764 |
+
"college": null,
|
765 |
+
"type": null
|
766 |
+
}
|
767 |
+
},
|
768 |
+
{
|
769 |
+
"chunk_id": "TMC-009",
|
770 |
+
"title": "Media Department",
|
771 |
+
"section": "The Master's Chapel",
|
772 |
+
"text": "The Media Department is concerned with displaying the sermon notes, scriptures, messages, announcements and other things digital mainly using a projector or via social media channels. They also are skilled in the arts of recording and making sure highlights of the service are well captured.",
|
773 |
+
"metadata": {
|
774 |
+
"source": null,
|
775 |
+
"tags": [
|
776 |
+
"nan"
|
777 |
+
],
|
778 |
+
"college": null,
|
779 |
+
"type": null
|
780 |
+
}
|
781 |
+
},
|
782 |
+
{
|
783 |
+
"chunk_id": "TMC-010",
|
784 |
+
"title": "Evangelism Department",
|
785 |
+
"section": "The Master's Chapel",
|
786 |
+
"text": "Following the matching orders of the Lord Jesus Christ, The Evangelism department is ever keen on making sure that no stone is left untouched in the bid to bring salvation on campus. Through earnest prayers and teachings, the heart of the Lord unfolds as well as His desire to restore the strayed sheep.",
|
787 |
+
"metadata": {
|
788 |
+
"source": null,
|
789 |
+
"tags": [
|
790 |
+
"nan"
|
791 |
+
],
|
792 |
+
"college": null,
|
793 |
+
"type": null
|
794 |
+
}
|
795 |
+
},
|
796 |
+
{
|
797 |
+
"chunk_id": "TMC-011",
|
798 |
+
"title": "Prayer Department",
|
799 |
+
"section": "The Master's Chapel",
|
800 |
+
"text": "The Prayer Department focuses on travailing on bended knees for the campus, its staff, students and Nigeria as a whole. Their goal is that God's will be established upon the earth's face. ",
|
801 |
+
"metadata": {
|
802 |
+
"source": null,
|
803 |
+
"tags": [
|
804 |
+
"nan"
|
805 |
+
],
|
806 |
+
"college": null,
|
807 |
+
"type": null
|
808 |
+
}
|
809 |
+
},
|
810 |
+
{
|
811 |
+
"chunk_id": "TMC-012",
|
812 |
+
"title": "Sanctuary Department",
|
813 |
+
"section": "The Master's Chapel",
|
814 |
+
"text": "The Sanctuary Department takes care of the chapel's appearance. Wth a focus on making sure that the holiness of God reflects even in every service with order from arranging chairs to cleaning the venue.",
|
815 |
+
"metadata": {
|
816 |
+
"source": null,
|
817 |
+
"tags": [
|
818 |
+
"nan"
|
819 |
+
],
|
820 |
+
"college": null,
|
821 |
+
"type": null
|
822 |
+
}
|
823 |
+
},
|
824 |
+
{
|
825 |
+
"chunk_id": "TMC-013",
|
826 |
+
"title": "Library Department",
|
827 |
+
"section": "The Master's Chapel",
|
828 |
+
"text": "These are workers that encourage, enable and drive workers, attendees and members to grow muscles in their mind through the study of the scriptures as well as other value-packed books.",
|
829 |
+
"metadata": {
|
830 |
+
"source": null,
|
831 |
+
"tags": [
|
832 |
+
"nan"
|
833 |
+
],
|
834 |
+
"college": null,
|
835 |
+
"type": null
|
836 |
+
}
|
837 |
+
},
|
838 |
+
{
|
839 |
+
"chunk_id": "TMC-014",
|
840 |
+
"title": "Devotional Leaders",
|
841 |
+
"section": "The Master's Chapel",
|
842 |
+
"text": "The devotional leaders group is more like a secondary department in that, members of other are permitted to join in the collective goal of reaching souls across all the hostels and halls of residence.",
|
843 |
+
"metadata": {
|
844 |
+
"source": null,
|
845 |
+
"tags": [
|
846 |
+
"nan"
|
847 |
+
],
|
848 |
+
"college": null,
|
849 |
+
"type": null
|
850 |
+
}
|
851 |
+
},
|
852 |
+
{
|
853 |
+
"chunk_id": "ACA-000",
|
854 |
+
"title": "Colleges & Faculties",
|
855 |
+
"section": "Department of Computer Science ",
|
856 |
+
"text": "Caleb has over 30 undergraduate degree programmes and 10+ postgraduate degree programmes across seven colleges: COPAS, CONBAMS, COLENSMA, CASMAS, COPOS, COLAW, COLED. All mature programmes/courses are accredited by the NUC and respective professional bodies.",
|
857 |
+
"metadata": {
|
858 |
+
"source": "Caleb University Profile",
|
859 |
+
"tags": [
|
860 |
+
"programs",
|
861 |
+
"courses",
|
862 |
+
"programs",
|
863 |
+
"programmes",
|
864 |
+
"departments",
|
865 |
+
"programs",
|
866 |
+
"colleges"
|
867 |
+
],
|
868 |
+
"college": "",
|
869 |
+
"type": ""
|
870 |
+
}
|
871 |
+
}
|
872 |
+
]
|
rag_pipeline.py
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
import faiss
|
3 |
+
import numpy as np
|
4 |
+
from sentence_transformers import SentenceTransformer, CrossEncoder
|
5 |
+
from sklearn.feature_extraction.text import TfidfVectorizer
|
6 |
+
from transformers import AutoTokenizer, T5ForConditionalGeneration
|
7 |
+
|
8 |
+
class RAGPipeline:
|
9 |
+
def __init__(
|
10 |
+
self,
|
11 |
+
json_path: str = "calebdata.json",
|
12 |
+
embedder_model: str = "infly/inf-retriever-v1-1.5b",
|
13 |
+
reranker_model: str = "cross-encoder/ms-marco-MiniLM-L-6-v2",
|
14 |
+
generator_model: str = "google/flan-t5-base"
|
15 |
+
):
|
16 |
+
self.chunks = self._load_chunks(json_path)
|
17 |
+
self.texts = list(set([chunk["text"] or "" for chunk in self.chunks]))
|
18 |
+
|
19 |
+
self.embedder = SentenceTransformer(embedder_model)
|
20 |
+
self.reranker = CrossEncoder(reranker_model)
|
21 |
+
self.tokenizer = AutoTokenizer.from_pretrained(generator_model)
|
22 |
+
self.generator = T5ForConditionalGeneration.from_pretrained(generator_model)
|
23 |
+
|
24 |
+
self.index = self._build_faiss_index()
|
25 |
+
self.tfidf_vectorizer, self.tfidf_matrix = self._build_tfidf()
|
26 |
+
|
27 |
+
def _load_chunks(self, path):
|
28 |
+
with open(path, "r") as f:
|
29 |
+
return json.load(f)
|
30 |
+
|
31 |
+
def _build_faiss_index(self):
|
32 |
+
embeddings = self.embedder.encode(self.texts, convert_to_numpy=True)
|
33 |
+
dimension = embeddings.shape[1]
|
34 |
+
index = faiss.IndexFlatL2(dimension)
|
35 |
+
index.add(embeddings)
|
36 |
+
return index
|
37 |
+
|
38 |
+
def _build_tfidf(self):
|
39 |
+
vectorizer = TfidfVectorizer()
|
40 |
+
matrix = vectorizer.fit_transform(self.texts)
|
41 |
+
return vectorizer, matrix
|
42 |
+
|
43 |
+
def _rerank(self, query, docs):
|
44 |
+
pairs = [(query, doc) for doc in docs]
|
45 |
+
scores = self.reranker.predict(pairs)
|
46 |
+
return [doc for _, doc in sorted(zip(scores, docs), reverse=True)]
|
47 |
+
|
48 |
+
def hybrid_search(self, query, top_k=3):
|
49 |
+
query_embedding = self.embedder.encode([query])[0]
|
50 |
+
_, faiss_indices = self.index.search(np.array([query_embedding]), top_k)
|
51 |
+
faiss_results = [self.texts[i] for i in faiss_indices[0]]
|
52 |
+
|
53 |
+
query_tfidf = self.tfidf_vectorizer.transform([query])
|
54 |
+
tfidf_scores = np.array(query_tfidf.dot(self.tfidf_matrix.T).toarray()).flatten()
|
55 |
+
tfidf_indices = tfidf_scores.argsort()[-top_k:][::-1]
|
56 |
+
tfidf_results = [self.texts[i] for i in tfidf_indices]
|
57 |
+
|
58 |
+
combined = list(set(faiss_results + tfidf_results))
|
59 |
+
return self._rerank(query, combined)[:top_k]
|
60 |
+
|
61 |
+
def generate_answer(self, query, top_k=3):
|
62 |
+
context = "\n".join(self.hybrid_search(query, top_k))
|
63 |
+
prompt = f"Answer the question based on the context.\n\nContext:\n{context}\n\nQuestion: {query}\nAnswer:"
|
64 |
+
inputs = self.tokenizer(prompt, return_tensors="pt", truncation=True, padding=True, max_length=512)
|
65 |
+
output = self.generator.generate(
|
66 |
+
input_ids=inputs["input_ids"],
|
67 |
+
attention_mask=inputs["attention_mask"],
|
68 |
+
max_length=300,
|
69 |
+
do_sample=True,
|
70 |
+
top_p=0.95,
|
71 |
+
top_k=50,
|
72 |
+
pad_token_id=self.tokenizer.eos_token_id
|
73 |
+
)
|
74 |
+
return self.tokenizer.decode(output[0], skip_special_tokens=True)
|
75 |
+
|
76 |
+
|
77 |
+
if __name__ == "__main__":
|
78 |
+
# Example Usage:
|
79 |
+
rag = RAGPipeline()
|
80 |
+
print(rag.generate_answer("Who is the President of NACOS?"))
|
requirements.txt
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
gradio
|
2 |
+
faiss-cpu
|
3 |
+
sentence-transformers>=2.2.2
|
4 |
+
scikit-learn>=1.1.3
|
5 |
+
numpy>=1.24.3
|
6 |
+
matplotlib>=3.7.1
|
7 |
+
scipy>=1.11.1
|
8 |
+
pandas>=2.0.1
|
9 |
+
nlpaug>=1.1.10
|
10 |
+
nltk>=3.8.1
|
11 |
+
torch>=2.0.1
|
12 |
+
transformers>=4.32.0
|