CS-09
xx / xx / 2024
CONVERSO
Chatbot Creation Platform
Talha Arshad Khan
21B-206-Cs
Syed Usman Riaz
21B-218-Cs
Shayan Naushad
21B-047-Cs
Anas Khan
21B-111-Cs
Laraib Jamal
21B-091-Cs
Meet The Team
POC
01
Cost
Domain Specific
Data Source
02
03
Actor Use Case
Diagram
Coding Architecture
Class Diagram
+ public
# protected
- private
Front Ends
Sequence
Diagram
ERD
Diagram
Object Diagram
Algorithms
Significance
Brute Force KNN Search
The brute force approach computes similarity distances from each query point to all the
reference points using a predefined metric. In our case, we are using IndexFlat L2 distance
metric that has the formula:
d(q,v) = √ (∑ (qi−vi)^2 )
It is versatile and widely applicable in domain such as information retrieval based on similarity.
It provides solutions for small datasets and is easily adaptable to various metrics.
Pseudocode
Input:
Q: a set of query points.
R: a set of reference points.
Output:
A list of ‘k’ reference points for each query point.
Steps:
1. For each query point q Q do:
∈
1) Compute distances between q and all r R.
∈
2) Sort the computed distances.
3) Select k-nearest reference points corresponding to k smallest distances.
Similar Algorithms
Brute Force KNN vs. Inverted File Index:
Algorithm Speed Accuracy Time Complexity Space Complexity
Brute-Force KNN Slow for large
datasets
Exact O(n.m.d) [1] O(m.d)
Inverted File Index
(IVF)
Faster (coarse
clusters)
Approximate O(W.D.DL) [2] O(W.D) [2]
[1] (IEEE)K-NEAREST NEIGHBOR SEARCH FAST GPU-BASED IMPLEMENTATIONS
[2] (IAENG InternationalJournalCS)Inverted Index Construction Algorithms For large dS
Algorithm Speed Accuracy Time Complexity Space Complexity
Brute-Force
KNN
Slow for large
datasets
Exact O(n.m.d) [1] O(m.d)
HNSW Very fast (graph
traversal)
High recall Construction:
O(n.log(n))
Query: O(log(n)) [2]
O(Mmax0
+mL.Mmax).bytes_per_link
[2]
Similar Algorithms
Brute Force KNN vs. Hierarchical Navigable Small World Graphs (HNSW):
[1] (IEEE)K-NEAREST NEIGHBOR SEARCH FAST GPU-BASED IMPLEMENTATIONS
[2] (RG)Efficient and robust approximate NN search
Similar Algorithms Big O Notation:
HNSW vs. Inverted File Index:
Algorithm Best Case Average Case Worst Case
Inverted File Index(IVF) Ω(D) Θ(D) O(W.D.DL) [3]
Hierarchical Navigable
Small World (HNSW)
Ω(logn) Θ(logn) Construction:
O(n.log(n))
Query: O(log(n)) [4]
BF KNN Search Ω(n.m.d) Θ(n.m.d) O(n.m.d)
[1]Inverted Index
[2]Understanding Recall in HNSW Search
[3] (IAENG InternationalJournalCS)Inverted Index Construction Algorithms For large dS
[4] (RG)Efficient and robust approximate NN search
Plagiarism Report
Thank You

CONVERSO_2nd milestoneitisthe_ppttt.pptx

  • 1.
    CS-09 xx / xx/ 2024 CONVERSO Chatbot Creation Platform
  • 2.
    Talha Arshad Khan 21B-206-Cs SyedUsman Riaz 21B-218-Cs Shayan Naushad 21B-047-Cs Anas Khan 21B-111-Cs Laraib Jamal 21B-091-Cs Meet The Team
  • 3.
  • 4.
  • 5.
  • 6.
    Class Diagram + public #protected - private
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
    Algorithms Significance Brute Force KNNSearch The brute force approach computes similarity distances from each query point to all the reference points using a predefined metric. In our case, we are using IndexFlat L2 distance metric that has the formula: d(q,v) = √ (∑ (qi−vi)^2 ) It is versatile and widely applicable in domain such as information retrieval based on similarity. It provides solutions for small datasets and is easily adaptable to various metrics.
  • 12.
    Pseudocode Input: Q: a setof query points. R: a set of reference points. Output: A list of ‘k’ reference points for each query point. Steps: 1. For each query point q Q do: ∈ 1) Compute distances between q and all r R. ∈ 2) Sort the computed distances. 3) Select k-nearest reference points corresponding to k smallest distances.
  • 13.
    Similar Algorithms Brute ForceKNN vs. Inverted File Index: Algorithm Speed Accuracy Time Complexity Space Complexity Brute-Force KNN Slow for large datasets Exact O(n.m.d) [1] O(m.d) Inverted File Index (IVF) Faster (coarse clusters) Approximate O(W.D.DL) [2] O(W.D) [2] [1] (IEEE)K-NEAREST NEIGHBOR SEARCH FAST GPU-BASED IMPLEMENTATIONS [2] (IAENG InternationalJournalCS)Inverted Index Construction Algorithms For large dS
  • 14.
    Algorithm Speed AccuracyTime Complexity Space Complexity Brute-Force KNN Slow for large datasets Exact O(n.m.d) [1] O(m.d) HNSW Very fast (graph traversal) High recall Construction: O(n.log(n)) Query: O(log(n)) [2] O(Mmax0 +mL.Mmax).bytes_per_link [2] Similar Algorithms Brute Force KNN vs. Hierarchical Navigable Small World Graphs (HNSW): [1] (IEEE)K-NEAREST NEIGHBOR SEARCH FAST GPU-BASED IMPLEMENTATIONS [2] (RG)Efficient and robust approximate NN search
  • 15.
    Similar Algorithms BigO Notation: HNSW vs. Inverted File Index: Algorithm Best Case Average Case Worst Case Inverted File Index(IVF) Ω(D) Θ(D) O(W.D.DL) [3] Hierarchical Navigable Small World (HNSW) Ω(logn) Θ(logn) Construction: O(n.log(n)) Query: O(log(n)) [4] BF KNN Search Ω(n.m.d) Θ(n.m.d) O(n.m.d) [1]Inverted Index [2]Understanding Recall in HNSW Search [3] (IAENG InternationalJournalCS)Inverted Index Construction Algorithms For large dS [4] (RG)Efficient and robust approximate NN search
  • 16.
  • 17.